@@ -23,10 +23,10 @@ |
||
23 | 23 | |
24 | 24 | //.doc, .dot |
25 | 25 | class MSOfficeDoc extends Office { |
26 | - /** |
|
27 | - * {@inheritDoc} |
|
28 | - */ |
|
29 | - public function getMimeType() { |
|
30 | - return '/application\/msword/'; |
|
31 | - } |
|
26 | + /** |
|
27 | + * {@inheritDoc} |
|
28 | + */ |
|
29 | + public function getMimeType() { |
|
30 | + return '/application\/msword/'; |
|
31 | + } |
|
32 | 32 | } |
@@ -24,10 +24,10 @@ |
||
24 | 24 | |
25 | 25 | // .otf, .ttf and .pfb |
26 | 26 | class Font extends Bitmap { |
27 | - /** |
|
28 | - * {@inheritDoc} |
|
29 | - */ |
|
30 | - public function getMimeType() { |
|
31 | - return '/application\/(?:font-sfnt|x-font$)/'; |
|
32 | - } |
|
27 | + /** |
|
28 | + * {@inheritDoc} |
|
29 | + */ |
|
30 | + public function getMimeType() { |
|
31 | + return '/application\/(?:font-sfnt|x-font$)/'; |
|
32 | + } |
|
33 | 33 | } |
34 | 34 | \ No newline at end of file |
@@ -25,10 +25,10 @@ |
||
25 | 25 | |
26 | 26 | //.eps |
27 | 27 | class Postscript extends Bitmap { |
28 | - /** |
|
29 | - * {@inheritDoc} |
|
30 | - */ |
|
31 | - public function getMimeType() { |
|
32 | - return '/application\/postscript/'; |
|
33 | - } |
|
28 | + /** |
|
29 | + * {@inheritDoc} |
|
30 | + */ |
|
31 | + public function getMimeType() { |
|
32 | + return '/application\/postscript/'; |
|
33 | + } |
|
34 | 34 | } |
@@ -22,15 +22,15 @@ |
||
22 | 22 | namespace OC\Share20; |
23 | 23 | |
24 | 24 | class Hooks { |
25 | - public static function post_deleteUser($arguments) { |
|
26 | - \OC::$server->getShareManager()->userDeleted($arguments['uid']); |
|
27 | - } |
|
25 | + public static function post_deleteUser($arguments) { |
|
26 | + \OC::$server->getShareManager()->userDeleted($arguments['uid']); |
|
27 | + } |
|
28 | 28 | |
29 | - public static function post_deleteGroup($arguments) { |
|
30 | - \OC::$server->getShareManager()->groupDeleted($arguments['gid']); |
|
31 | - } |
|
29 | + public static function post_deleteGroup($arguments) { |
|
30 | + \OC::$server->getShareManager()->groupDeleted($arguments['gid']); |
|
31 | + } |
|
32 | 32 | |
33 | - public static function post_removeFromGroup($arguments) { |
|
34 | - \OC::$server->getShareManager()->userDeletedFromGroup($arguments['uid'], $arguments['gid']); |
|
35 | - } |
|
33 | + public static function post_removeFromGroup($arguments) { |
|
34 | + \OC::$server->getShareManager()->userDeletedFromGroup($arguments['uid'], $arguments['gid']); |
|
35 | + } |
|
36 | 36 | } |
@@ -27,12 +27,12 @@ |
||
27 | 27 | |
28 | 28 | class ModuleAlreadyExistsException extends GenericEncryptionException { |
29 | 29 | |
30 | - /** |
|
31 | - * @param string $id |
|
32 | - * @param string $name |
|
33 | - */ |
|
34 | - public function __construct($id, $name) { |
|
35 | - parent::__construct('Id "' . $id . '" already used by encryption module "' . $name . '"'); |
|
36 | - } |
|
30 | + /** |
|
31 | + * @param string $id |
|
32 | + * @param string $name |
|
33 | + */ |
|
34 | + public function __construct($id, $name) { |
|
35 | + parent::__construct('Id "' . $id . '" already used by encryption module "' . $name . '"'); |
|
36 | + } |
|
37 | 37 | |
38 | 38 | } |
@@ -28,8 +28,8 @@ |
||
28 | 28 | |
29 | 29 | class EncryptionHeaderToLargeException extends GenericEncryptionException { |
30 | 30 | |
31 | - public function __construct() { |
|
32 | - parent::__construct('max header size exceeded'); |
|
33 | - } |
|
31 | + public function __construct() { |
|
32 | + parent::__construct('max header size exceeded'); |
|
33 | + } |
|
34 | 34 | |
35 | 35 | } |
@@ -27,10 +27,10 @@ |
||
27 | 27 | |
28 | 28 | class EncryptionHeaderKeyExistsException extends GenericEncryptionException { |
29 | 29 | |
30 | - /** |
|
31 | - * @param string $key |
|
32 | - */ |
|
33 | - public function __construct($key) { |
|
34 | - parent::__construct('header key "'. $key . '" already reserved by ownCloud'); |
|
35 | - } |
|
30 | + /** |
|
31 | + * @param string $key |
|
32 | + */ |
|
33 | + public function __construct($key) { |
|
34 | + parent::__construct('header key "'. $key . '" already reserved by ownCloud'); |
|
35 | + } |
|
36 | 36 | } |
@@ -41,85 +41,85 @@ |
||
41 | 41 | */ |
42 | 42 | class EncryptionWrapper { |
43 | 43 | |
44 | - /** @var ArrayCache */ |
|
45 | - private $arrayCache; |
|
44 | + /** @var ArrayCache */ |
|
45 | + private $arrayCache; |
|
46 | 46 | |
47 | - /** @var Manager */ |
|
48 | - private $manager; |
|
47 | + /** @var Manager */ |
|
48 | + private $manager; |
|
49 | 49 | |
50 | - /** @var ILogger */ |
|
51 | - private $logger; |
|
50 | + /** @var ILogger */ |
|
51 | + private $logger; |
|
52 | 52 | |
53 | - /** |
|
54 | - * EncryptionWrapper constructor. |
|
55 | - * |
|
56 | - * @param ArrayCache $arrayCache |
|
57 | - * @param Manager $manager |
|
58 | - * @param ILogger $logger |
|
59 | - */ |
|
60 | - public function __construct(ArrayCache $arrayCache, |
|
61 | - Manager $manager, |
|
62 | - ILogger $logger |
|
63 | - ) { |
|
64 | - $this->arrayCache = $arrayCache; |
|
65 | - $this->manager = $manager; |
|
66 | - $this->logger = $logger; |
|
67 | - } |
|
53 | + /** |
|
54 | + * EncryptionWrapper constructor. |
|
55 | + * |
|
56 | + * @param ArrayCache $arrayCache |
|
57 | + * @param Manager $manager |
|
58 | + * @param ILogger $logger |
|
59 | + */ |
|
60 | + public function __construct(ArrayCache $arrayCache, |
|
61 | + Manager $manager, |
|
62 | + ILogger $logger |
|
63 | + ) { |
|
64 | + $this->arrayCache = $arrayCache; |
|
65 | + $this->manager = $manager; |
|
66 | + $this->logger = $logger; |
|
67 | + } |
|
68 | 68 | |
69 | - /** |
|
70 | - * Wraps the given storage when it is not a shared storage |
|
71 | - * |
|
72 | - * @param string $mountPoint |
|
73 | - * @param Storage $storage |
|
74 | - * @param IMountPoint $mount |
|
75 | - * @return Encryption|Storage |
|
76 | - */ |
|
77 | - public function wrapStorage($mountPoint, Storage $storage, IMountPoint $mount) { |
|
78 | - $parameters = [ |
|
79 | - 'storage' => $storage, |
|
80 | - 'mountPoint' => $mountPoint, |
|
81 | - 'mount' => $mount |
|
82 | - ]; |
|
69 | + /** |
|
70 | + * Wraps the given storage when it is not a shared storage |
|
71 | + * |
|
72 | + * @param string $mountPoint |
|
73 | + * @param Storage $storage |
|
74 | + * @param IMountPoint $mount |
|
75 | + * @return Encryption|Storage |
|
76 | + */ |
|
77 | + public function wrapStorage($mountPoint, Storage $storage, IMountPoint $mount) { |
|
78 | + $parameters = [ |
|
79 | + 'storage' => $storage, |
|
80 | + 'mountPoint' => $mountPoint, |
|
81 | + 'mount' => $mount |
|
82 | + ]; |
|
83 | 83 | |
84 | - if (!$storage->instanceOfStorage('OCA\Files_Sharing\SharedStorage') |
|
85 | - && !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') |
|
86 | - && !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud')) { |
|
84 | + if (!$storage->instanceOfStorage('OCA\Files_Sharing\SharedStorage') |
|
85 | + && !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') |
|
86 | + && !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud')) { |
|
87 | 87 | |
88 | - $user = \OC::$server->getUserSession()->getUser(); |
|
89 | - $mountManager = Filesystem::getMountManager(); |
|
90 | - $uid = $user ? $user->getUID() : null; |
|
91 | - $fileHelper = \OC::$server->getEncryptionFilesHelper(); |
|
92 | - $keyStorage = \OC::$server->getEncryptionKeyStorage(); |
|
88 | + $user = \OC::$server->getUserSession()->getUser(); |
|
89 | + $mountManager = Filesystem::getMountManager(); |
|
90 | + $uid = $user ? $user->getUID() : null; |
|
91 | + $fileHelper = \OC::$server->getEncryptionFilesHelper(); |
|
92 | + $keyStorage = \OC::$server->getEncryptionKeyStorage(); |
|
93 | 93 | |
94 | - $util = new Util( |
|
95 | - new View(), |
|
96 | - \OC::$server->getUserManager(), |
|
97 | - \OC::$server->getGroupManager(), |
|
98 | - \OC::$server->getConfig() |
|
99 | - ); |
|
100 | - $update = new Update( |
|
101 | - new View(), |
|
102 | - $util, |
|
103 | - Filesystem::getMountManager(), |
|
104 | - $this->manager, |
|
105 | - $fileHelper, |
|
106 | - $uid |
|
107 | - ); |
|
108 | - return new Encryption( |
|
109 | - $parameters, |
|
110 | - $this->manager, |
|
111 | - $util, |
|
112 | - $this->logger, |
|
113 | - $fileHelper, |
|
114 | - $uid, |
|
115 | - $keyStorage, |
|
116 | - $update, |
|
117 | - $mountManager, |
|
118 | - $this->arrayCache |
|
119 | - ); |
|
120 | - } else { |
|
121 | - return $storage; |
|
122 | - } |
|
123 | - } |
|
94 | + $util = new Util( |
|
95 | + new View(), |
|
96 | + \OC::$server->getUserManager(), |
|
97 | + \OC::$server->getGroupManager(), |
|
98 | + \OC::$server->getConfig() |
|
99 | + ); |
|
100 | + $update = new Update( |
|
101 | + new View(), |
|
102 | + $util, |
|
103 | + Filesystem::getMountManager(), |
|
104 | + $this->manager, |
|
105 | + $fileHelper, |
|
106 | + $uid |
|
107 | + ); |
|
108 | + return new Encryption( |
|
109 | + $parameters, |
|
110 | + $this->manager, |
|
111 | + $util, |
|
112 | + $this->logger, |
|
113 | + $fileHelper, |
|
114 | + $uid, |
|
115 | + $keyStorage, |
|
116 | + $update, |
|
117 | + $mountManager, |
|
118 | + $this->arrayCache |
|
119 | + ); |
|
120 | + } else { |
|
121 | + return $storage; |
|
122 | + } |
|
123 | + } |
|
124 | 124 | |
125 | 125 | } |
@@ -27,50 +27,50 @@ |
||
27 | 27 | use OC\Files\View; |
28 | 28 | |
29 | 29 | class HookManager { |
30 | - /** |
|
31 | - * @var Update |
|
32 | - */ |
|
33 | - private static $updater; |
|
30 | + /** |
|
31 | + * @var Update |
|
32 | + */ |
|
33 | + private static $updater; |
|
34 | 34 | |
35 | - public static function postShared($params) { |
|
36 | - self::getUpdate()->postShared($params); |
|
37 | - } |
|
38 | - public static function postUnshared($params) { |
|
39 | - self::getUpdate()->postUnshared($params); |
|
40 | - } |
|
35 | + public static function postShared($params) { |
|
36 | + self::getUpdate()->postShared($params); |
|
37 | + } |
|
38 | + public static function postUnshared($params) { |
|
39 | + self::getUpdate()->postUnshared($params); |
|
40 | + } |
|
41 | 41 | |
42 | - public static function postRename($params) { |
|
43 | - self::getUpdate()->postRename($params); |
|
44 | - } |
|
42 | + public static function postRename($params) { |
|
43 | + self::getUpdate()->postRename($params); |
|
44 | + } |
|
45 | 45 | |
46 | - public static function postRestore($params) { |
|
47 | - self::getUpdate()->postRestore($params); |
|
48 | - } |
|
46 | + public static function postRestore($params) { |
|
47 | + self::getUpdate()->postRestore($params); |
|
48 | + } |
|
49 | 49 | |
50 | - /** |
|
51 | - * @return Update |
|
52 | - */ |
|
53 | - private static function getUpdate() { |
|
54 | - if (is_null(self::$updater)) { |
|
55 | - $user = \OC::$server->getUserSession()->getUser(); |
|
56 | - $uid = ''; |
|
57 | - if ($user) { |
|
58 | - $uid = $user->getUID(); |
|
59 | - } |
|
60 | - self::$updater = new Update( |
|
61 | - new View(), |
|
62 | - new Util( |
|
63 | - new View(), |
|
64 | - \OC::$server->getUserManager(), |
|
65 | - \OC::$server->getGroupManager(), |
|
66 | - \OC::$server->getConfig()), |
|
67 | - Filesystem::getMountManager(), |
|
68 | - \OC::$server->getEncryptionManager(), |
|
69 | - \OC::$server->getEncryptionFilesHelper(), |
|
70 | - $uid |
|
71 | - ); |
|
72 | - } |
|
50 | + /** |
|
51 | + * @return Update |
|
52 | + */ |
|
53 | + private static function getUpdate() { |
|
54 | + if (is_null(self::$updater)) { |
|
55 | + $user = \OC::$server->getUserSession()->getUser(); |
|
56 | + $uid = ''; |
|
57 | + if ($user) { |
|
58 | + $uid = $user->getUID(); |
|
59 | + } |
|
60 | + self::$updater = new Update( |
|
61 | + new View(), |
|
62 | + new Util( |
|
63 | + new View(), |
|
64 | + \OC::$server->getUserManager(), |
|
65 | + \OC::$server->getGroupManager(), |
|
66 | + \OC::$server->getConfig()), |
|
67 | + Filesystem::getMountManager(), |
|
68 | + \OC::$server->getEncryptionManager(), |
|
69 | + \OC::$server->getEncryptionFilesHelper(), |
|
70 | + $uid |
|
71 | + ); |
|
72 | + } |
|
73 | 73 | |
74 | - return self::$updater; |
|
75 | - } |
|
74 | + return self::$updater; |
|
75 | + } |
|
76 | 76 | } |