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