2011-10-21 19:02:11 +04:00
|
|
|
<?php
|
|
|
|
|
2013-03-02 15:18:28 +04:00
|
|
|
OC::$CLASSPATH['OCA\Encryption\Crypt'] = 'files_encryption/lib/crypt.php';
|
|
|
|
OC::$CLASSPATH['OCA\Encryption\Hooks'] = 'files_encryption/hooks/hooks.php';
|
|
|
|
OC::$CLASSPATH['OCA\Encryption\Util'] = 'files_encryption/lib/util.php';
|
|
|
|
OC::$CLASSPATH['OCA\Encryption\Keymanager'] = 'files_encryption/lib/keymanager.php';
|
|
|
|
OC::$CLASSPATH['OCA\Encryption\Stream'] = 'files_encryption/lib/stream.php';
|
|
|
|
OC::$CLASSPATH['OCA\Encryption\Proxy'] = 'files_encryption/lib/proxy.php';
|
|
|
|
OC::$CLASSPATH['OCA\Encryption\Session'] = 'files_encryption/lib/session.php';
|
2013-03-09 04:04:33 +04:00
|
|
|
OC::$CLASSPATH['OCA\Encryption\Capabilities'] = 'files_encryption/lib/capabilities.php';
|
2013-05-09 21:36:18 +04:00
|
|
|
OC::$CLASSPATH['OCA\Encryption\Helper'] = 'files_encryption/lib/helper.php';
|
2011-10-21 19:02:11 +04:00
|
|
|
|
2014-07-16 14:06:00 +04:00
|
|
|
// Exceptions
|
|
|
|
OC::$CLASSPATH['OCA\Encryption\Exceptions\MultiKeyEncryptException'] = 'files_encryption/lib/exceptions.php';
|
|
|
|
OC::$CLASSPATH['OCA\Encryption\Exceptions\MultiKeyDecryptException'] = 'files_encryption/lib/exceptions.php';
|
|
|
|
|
2014-02-11 15:44:06 +04:00
|
|
|
\OCP\Util::addscript('files_encryption', 'encryption');
|
2013-11-26 02:49:05 +04:00
|
|
|
\OCP\Util::addscript('files_encryption', 'detect-migration');
|
|
|
|
|
2013-05-31 22:34:43 +04:00
|
|
|
if (!OC_Config::getValue('maintenance', false)) {
|
2013-05-31 00:41:30 +04:00
|
|
|
OC_FileProxy::register(new OCA\Encryption\Proxy());
|
2011-10-21 19:02:11 +04:00
|
|
|
|
2013-05-31 00:41:30 +04:00
|
|
|
// User related hooks
|
|
|
|
OCA\Encryption\Helper::registerUserHooks();
|
2011-10-21 19:02:11 +04:00
|
|
|
|
2013-05-31 00:41:30 +04:00
|
|
|
// Sharing related hooks
|
|
|
|
OCA\Encryption\Helper::registerShareHooks();
|
2013-01-14 23:07:28 +04:00
|
|
|
|
2013-05-31 00:41:30 +04:00
|
|
|
// Filesystem related hooks
|
|
|
|
OCA\Encryption\Helper::registerFilesystemHooks();
|
2013-04-27 22:18:05 +04:00
|
|
|
|
2013-06-27 16:09:22 +04:00
|
|
|
// App manager related hooks
|
|
|
|
OCA\Encryption\Helper::registerAppHooks();
|
|
|
|
|
2013-09-03 17:56:25 +04:00
|
|
|
if(!in_array('crypt', stream_get_wrappers())) {
|
|
|
|
stream_wrapper_register('crypt', 'OCA\Encryption\Stream');
|
|
|
|
}
|
2013-05-31 00:41:30 +04:00
|
|
|
} else {
|
|
|
|
// logout user if we are in maintenance to force re-login
|
|
|
|
OCP\User::logout();
|
2013-05-15 16:32:50 +04:00
|
|
|
}
|
2012-02-23 01:20:46 +04:00
|
|
|
|
2013-02-09 21:01:38 +04:00
|
|
|
// Register settings scripts
|
2013-05-27 19:26:58 +04:00
|
|
|
OCP\App::registerAdmin('files_encryption', 'settings-admin');
|
|
|
|
OCP\App::registerPersonal('files_encryption', 'settings-personal');
|