2011-10-21 15:02:11 +00:00
|
|
|
<?php
|
2015-02-23 10:28:53 +00:00
|
|
|
/**
|
|
|
|
* @author Bjoern Schiessle <schiessle@owncloud.com>
|
|
|
|
* @author Björn Schießle <schiessle@owncloud.com>
|
|
|
|
* @author Florin Peter <github@florin-peter.de>
|
|
|
|
* @author Joas Schilling <nickvergessen@gmx.de>
|
|
|
|
* @author Robin Appelman <icewind@owncloud.com>
|
|
|
|
* @author Sam Tuke <mail@samtuke.com>
|
|
|
|
* @author Thomas Müller <thomas.mueller@tmit.eu>
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2015, ownCloud, Inc.
|
|
|
|
* @license AGPL-3.0
|
|
|
|
*
|
|
|
|
* This code is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Affero General Public License, version 3,
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Affero General Public License, version 3,
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
|
|
|
*
|
|
|
|
*/
|
2014-02-11 11:44:06 +00:00
|
|
|
\OCP\Util::addscript('files_encryption', 'encryption');
|
2013-11-25 22:49:05 +00:00
|
|
|
\OCP\Util::addscript('files_encryption', 'detect-migration');
|
|
|
|
|
2013-05-31 18:34:43 +00:00
|
|
|
if (!OC_Config::getValue('maintenance', false)) {
|
2014-12-03 15:52:44 +00:00
|
|
|
OC_FileProxy::register(new OCA\Files_Encryption\Proxy());
|
2011-10-21 15:02:11 +00:00
|
|
|
|
2013-05-30 20:41:30 +00:00
|
|
|
// User related hooks
|
2014-12-03 15:52:44 +00:00
|
|
|
OCA\Files_Encryption\Helper::registerUserHooks();
|
2011-10-21 15:02:11 +00:00
|
|
|
|
2013-05-30 20:41:30 +00:00
|
|
|
// Sharing related hooks
|
2014-12-03 15:52:44 +00:00
|
|
|
OCA\Files_Encryption\Helper::registerShareHooks();
|
2013-01-14 19:07:28 +00:00
|
|
|
|
2013-05-30 20:41:30 +00:00
|
|
|
// Filesystem related hooks
|
2014-12-03 15:52:44 +00:00
|
|
|
OCA\Files_Encryption\Helper::registerFilesystemHooks();
|
2013-04-27 18:18:05 +00:00
|
|
|
|
2013-06-27 12:09:22 +00:00
|
|
|
// App manager related hooks
|
2014-12-03 15:52:44 +00:00
|
|
|
OCA\Files_Encryption\Helper::registerAppHooks();
|
2013-06-27 12:09:22 +00:00
|
|
|
|
2013-09-03 13:56:25 +00:00
|
|
|
if(!in_array('crypt', stream_get_wrappers())) {
|
2014-12-03 15:52:44 +00:00
|
|
|
stream_wrapper_register('crypt', 'OCA\Files_Encryption\Stream');
|
2013-09-03 13:56:25 +00:00
|
|
|
}
|
2013-05-30 20:41:30 +00:00
|
|
|
} else {
|
|
|
|
// logout user if we are in maintenance to force re-login
|
|
|
|
OCP\User::logout();
|
2013-05-15 12:32:50 +00:00
|
|
|
}
|
2012-02-22 21:20:46 +00:00
|
|
|
|
2013-02-09 17:01:38 +00:00
|
|
|
// Register settings scripts
|
2013-05-27 15:26:58 +00:00
|
|
|
OCP\App::registerAdmin('files_encryption', 'settings-admin');
|
|
|
|
OCP\App::registerPersonal('files_encryption', 'settings-personal');
|