2011-10-21 19:02:11 +04:00
|
|
|
<?php
|
|
|
|
|
2014-10-17 21:47:37 +04:00
|
|
|
\OCP\Util::addTranslations('files_encryption');
|
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)) {
|
2014-12-03 18:52:44 +03:00
|
|
|
OC_FileProxy::register(new OCA\Files_Encryption\Proxy());
|
2011-10-21 19:02:11 +04:00
|
|
|
|
2013-05-31 00:41:30 +04:00
|
|
|
// User related hooks
|
2014-12-03 18:52:44 +03:00
|
|
|
OCA\Files_Encryption\Helper::registerUserHooks();
|
2011-10-21 19:02:11 +04:00
|
|
|
|
2013-05-31 00:41:30 +04:00
|
|
|
// Sharing related hooks
|
2014-12-03 18:52:44 +03:00
|
|
|
OCA\Files_Encryption\Helper::registerShareHooks();
|
2013-01-14 23:07:28 +04:00
|
|
|
|
2013-05-31 00:41:30 +04:00
|
|
|
// Filesystem related hooks
|
2014-12-03 18:52:44 +03:00
|
|
|
OCA\Files_Encryption\Helper::registerFilesystemHooks();
|
2013-04-27 22:18:05 +04:00
|
|
|
|
2013-06-27 16:09:22 +04:00
|
|
|
// App manager related hooks
|
2014-12-03 18:52:44 +03:00
|
|
|
OCA\Files_Encryption\Helper::registerAppHooks();
|
2013-06-27 16:09:22 +04:00
|
|
|
|
2013-09-03 17:56:25 +04:00
|
|
|
if(!in_array('crypt', stream_get_wrappers())) {
|
2014-12-03 18:52:44 +03:00
|
|
|
stream_wrapper_register('crypt', 'OCA\Files_Encryption\Stream');
|
2013-09-03 17:56:25 +04:00
|
|
|
}
|
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');
|