Blame view

sources/apps/files_encryption/appinfo/app.php 2.13 KB
03e52840d   Kload   Init
1
2
3
4
5
6
7
8
9
10
11
  <?php
  
  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';
  OC::$CLASSPATH['OCA\Encryption\Capabilities'] = 'files_encryption/lib/capabilities.php';
  OC::$CLASSPATH['OCA\Encryption\Helper'] = 'files_encryption/lib/helper.php';
6d9380f96   Cédric Dupont   Update sources OC...
12
13
14
  // Exceptions
  OC::$CLASSPATH['OCA\Encryption\Exceptions\MultiKeyEncryptException'] = 'files_encryption/lib/exceptions.php';
  OC::$CLASSPATH['OCA\Encryption\Exceptions\MultiKeyDecryptException'] = 'files_encryption/lib/exceptions.php';
a293d369c   Kload   Update sources to...
15
  \OCP\Util::addscript('files_encryption', 'encryption');
31b7f2792   Kload   Upgrade to ownclo...
16
  \OCP\Util::addscript('files_encryption', 'detect-migration');
03e52840d   Kload   Init
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  if (!OC_Config::getValue('maintenance', false)) {
  	OC_FileProxy::register(new OCA\Encryption\Proxy());
  
  	// User related hooks
  	OCA\Encryption\Helper::registerUserHooks();
  
  	// Sharing related hooks
  	OCA\Encryption\Helper::registerShareHooks();
  
  	// Filesystem related hooks
  	OCA\Encryption\Helper::registerFilesystemHooks();
  
  	// App manager related hooks
  	OCA\Encryption\Helper::registerAppHooks();
  
  	if(!in_array('crypt', stream_get_wrappers())) {
  		stream_wrapper_register('crypt', 'OCA\Encryption\Stream');
  	}
  
  	// check if we are logged in
  	if (OCP\User::isLoggedIn()) {
  
  		// ensure filesystem is loaded
  		if (!\OC\Files\Filesystem::$loaded) {
  			\OC_Util::setupFS();
  		}
6d9380f96   Cédric Dupont   Update sources OC...
43
  		$view = new OC\Files\View('/');
03e52840d   Kload   Init
44
45
46
47
48
  
  		$sessionReady = OCA\Encryption\Helper::checkRequirements();
  		if($sessionReady) {
  			$session = new \OCA\Encryption\Session($view);
  		}
03e52840d   Kload   Init
49
50
51
52
53
54
55
56
57
  	}
  } else {
  	// logout user if we are in maintenance to force re-login
  	OCP\User::logout();
  }
  
  // Register settings scripts
  OCP\App::registerAdmin('files_encryption', 'settings-admin');
  OCP\App::registerPersonal('files_encryption', 'settings-personal');