@@ -65,7 +65,7 @@ |
||
65 | 65 | return null; |
66 | 66 | } |
67 | 67 | |
68 | - return new MountPoint('\OC\Files\ObjectStore\HomeObjectStoreStorage', '/' . $user->getUID(), $config['arguments'], $loader, null, null, self::class); |
|
68 | + return new MountPoint('\OC\Files\ObjectStore\HomeObjectStoreStorage', '/'.$user->getUID(), $config['arguments'], $loader, null, null, self::class); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | foreach ($directoryRange as $child) { |
68 | 68 | $mountPoints[] = new MountPoint( |
69 | 69 | AppdataPreviewObjectStoreStorage::class, |
70 | - '/appdata_' . $instanceId . '/preview/' . $parent . '/' . $child, |
|
70 | + '/appdata_'.$instanceId.'/preview/'.$parent.'/'.$child, |
|
71 | 71 | $this->getMultiBucketObjectStore($i), |
72 | 72 | $loader, |
73 | 73 | null, |
@@ -82,13 +82,13 @@ discard block |
||
82 | 82 | $fakeRootStorage = new ObjectStoreStorage($rootStorageArguments); |
83 | 83 | $fakeRootStorageJail = new Jail([ |
84 | 84 | 'storage' => $fakeRootStorage, |
85 | - 'root' => '/appdata_' . $instanceId . '/preview', |
|
85 | + 'root' => '/appdata_'.$instanceId.'/preview', |
|
86 | 86 | ]); |
87 | 87 | |
88 | 88 | // add a fallback location to be able to fetch existing previews from the old bucket |
89 | 89 | $mountPoints[] = new MountPoint( |
90 | 90 | $fakeRootStorageJail, |
91 | - '/appdata_' . $instanceId . '/preview/old-multibucket', |
|
91 | + '/appdata_'.$instanceId.'/preview/old-multibucket', |
|
92 | 92 | null, |
93 | 93 | $loader, |
94 | 94 | null, |
@@ -102,6 +102,6 @@ |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | public function __toString() { |
105 | - return $this->getId() . ' ' . $this->getDescription() . ' ' . $this->getDuration(); |
|
105 | + return $this->getId().' '.$this->getDescription().' '.$this->getDuration(); |
|
106 | 106 | } |
107 | 107 | } |
@@ -71,7 +71,7 @@ |
||
71 | 71 | } |
72 | 72 | |
73 | 73 | private function getLocalRootMount(IStorageFactory $loader): MountPoint { |
74 | - $configDataDirectory = $this->config->getSystemValue("datadirectory", OC::$SERVERROOT . "/data"); |
|
74 | + $configDataDirectory = $this->config->getSystemValue("datadirectory", OC::$SERVERROOT."/data"); |
|
75 | 75 | return new MountPoint(LocalRootStorage::class, '/', ['datadir' => $configDataDirectory], $loader, null, null, self::class); |
76 | 76 | } |
77 | 77 |
@@ -100,11 +100,11 @@ |
||
100 | 100 | * @param string $newPath new path relative to data/user/files |
101 | 101 | */ |
102 | 102 | private static function renameChildren($oldPath, $newPath) { |
103 | - $absNewPath = \OC\Files\Filesystem::normalizePath('/' . \OC_User::getUser() . '/files/' . $newPath); |
|
104 | - $absOldPath = \OC\Files\Filesystem::normalizePath('/' . \OC_User::getUser() . '/files/' . $oldPath); |
|
103 | + $absNewPath = \OC\Files\Filesystem::normalizePath('/'.\OC_User::getUser().'/files/'.$newPath); |
|
104 | + $absOldPath = \OC\Files\Filesystem::normalizePath('/'.\OC_User::getUser().'/files/'.$oldPath); |
|
105 | 105 | |
106 | 106 | $mountManager = \OC\Files\Filesystem::getMountManager(); |
107 | - $mountedShares = $mountManager->findIn('/' . \OC_User::getUser() . '/files/' . $oldPath); |
|
107 | + $mountedShares = $mountManager->findIn('/'.\OC_User::getUser().'/files/'.$oldPath); |
|
108 | 108 | foreach ($mountedShares as $mount) { |
109 | 109 | /** @var MountPoint $mount */ |
110 | 110 | if ($mount->getStorage()->instanceOfStorage(ISharedStorage::class)) { |
@@ -78,7 +78,7 @@ |
||
78 | 78 | * @param string $userSearch the pattern users are search for |
79 | 79 | */ |
80 | 80 | public function get(string $groupSearch = '', string $userSearch = ''): array { |
81 | - $key = $groupSearch . '::' . $userSearch; |
|
81 | + $key = $groupSearch.'::'.$userSearch; |
|
82 | 82 | if (isset($this->metaData[$key])) { |
83 | 83 | return $this->metaData[$key]; |
84 | 84 | } |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | } |
83 | 83 | |
84 | 84 | public function register(IRegistrationContext $context): void { |
85 | - $context->registerService(IAuditLogger::class, function (ContainerInterface $c) { |
|
85 | + $context->registerService(IAuditLogger::class, function(ContainerInterface $c) { |
|
86 | 86 | return new AuditLogger($c->get(ILogFactory::class), $c->get(Iconfig::class)); |
87 | 87 | }); |
88 | 88 | |
@@ -170,15 +170,15 @@ discard block |
||
170 | 170 | |
171 | 171 | private function appHooks(IAuditLogger $logger, |
172 | 172 | EventDispatcherInterface $eventDispatcher): void { |
173 | - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function (ManagerEvent $event) use ($logger) { |
|
173 | + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE, function(ManagerEvent $event) use ($logger) { |
|
174 | 174 | $appActions = new AppManagement($logger); |
175 | 175 | $appActions->enableApp($event->getAppID()); |
176 | 176 | }); |
177 | - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, function (ManagerEvent $event) use ($logger) { |
|
177 | + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_ENABLE_FOR_GROUPS, function(ManagerEvent $event) use ($logger) { |
|
178 | 178 | $appActions = new AppManagement($logger); |
179 | 179 | $appActions->enableAppForGroups($event->getAppID(), $event->getGroups()); |
180 | 180 | }); |
181 | - $eventDispatcher->addListener(ManagerEvent::EVENT_APP_DISABLE, function (ManagerEvent $event) use ($logger) { |
|
181 | + $eventDispatcher->addListener(ManagerEvent::EVENT_APP_DISABLE, function(ManagerEvent $event) use ($logger) { |
|
182 | 182 | $appActions = new AppManagement($logger); |
183 | 183 | $appActions->disableApp($event->getAppID()); |
184 | 184 | }); |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | private function consoleHooks(IAuditLogger $logger, |
188 | 188 | EventDispatcherInterface $eventDispatcher): void { |
189 | - $eventDispatcher->addListener(ConsoleEvent::EVENT_RUN, function (ConsoleEvent $event) use ($logger) { |
|
189 | + $eventDispatcher->addListener(ConsoleEvent::EVENT_RUN, function(ConsoleEvent $event) use ($logger) { |
|
190 | 190 | $appActions = new Console($logger); |
191 | 191 | $appActions->runCommand($event->getArguments()); |
192 | 192 | }); |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | $fileActions = new Files($logger); |
198 | 198 | $eventDispatcher->addListener( |
199 | 199 | IPreview::EVENT, |
200 | - function (GenericEvent $event) use ($fileActions) { |
|
200 | + function(GenericEvent $event) use ($fileActions) { |
|
201 | 201 | /** @var File $file */ |
202 | 202 | $file = $event->getSubject(); |
203 | 203 | $fileActions->preview([ |
@@ -268,11 +268,11 @@ discard block |
||
268 | 268 | |
269 | 269 | private function securityHooks(IAuditLogger $logger, |
270 | 270 | EventDispatcherInterface $eventDispatcher): void { |
271 | - $eventDispatcher->addListener(IProvider::EVENT_SUCCESS, function (GenericEvent $event) use ($logger) { |
|
271 | + $eventDispatcher->addListener(IProvider::EVENT_SUCCESS, function(GenericEvent $event) use ($logger) { |
|
272 | 272 | $security = new Security($logger); |
273 | 273 | $security->twofactorSuccess($event->getSubject(), $event->getArguments()); |
274 | 274 | }); |
275 | - $eventDispatcher->addListener(IProvider::EVENT_FAILED, function (GenericEvent $event) use ($logger) { |
|
275 | + $eventDispatcher->addListener(IProvider::EVENT_FAILED, function(GenericEvent $event) use ($logger) { |
|
276 | 276 | $security = new Security($logger); |
277 | 277 | $security->twofactorFailed($event->getSubject(), $event->getArguments()); |
278 | 278 | }); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | $logFile = $config->getSystemValueString('logfile_audit', ''); |
43 | 43 | |
44 | 44 | if ($auditType === 'file' && !$logFile) { |
45 | - $default = $config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data') . '/audit.log'; |
|
45 | + $default = $config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data').'/audit.log'; |
|
46 | 46 | // Legacy way was appconfig, now it's paralleled with the normal log config |
47 | 47 | $logFile = $config->getAppValue('admin_audit', 'logfile', $default); |
48 | 48 | } |
@@ -6,21 +6,21 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
10 | - 'OCA\\AdminAudit\\Actions\\Action' => $baseDir . '/../lib/Actions/Action.php', |
|
11 | - 'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir . '/../lib/Actions/AppManagement.php', |
|
12 | - 'OCA\\AdminAudit\\Actions\\Auth' => $baseDir . '/../lib/Actions/Auth.php', |
|
13 | - 'OCA\\AdminAudit\\Actions\\Console' => $baseDir . '/../lib/Actions/Console.php', |
|
14 | - 'OCA\\AdminAudit\\Actions\\Files' => $baseDir . '/../lib/Actions/Files.php', |
|
15 | - 'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir . '/../lib/Actions/GroupManagement.php', |
|
16 | - 'OCA\\AdminAudit\\Actions\\Security' => $baseDir . '/../lib/Actions/Security.php', |
|
17 | - 'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir . '/../lib/Actions/Sharing.php', |
|
18 | - 'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir . '/../lib/Actions/Trashbin.php', |
|
19 | - 'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir . '/../lib/Actions/UserManagement.php', |
|
20 | - 'OCA\\AdminAudit\\Actions\\Versions' => $baseDir . '/../lib/Actions/Versions.php', |
|
21 | - 'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
22 | - 'OCA\\AdminAudit\\AuditLogger' => $baseDir . '/../lib/AuditLogger.php', |
|
23 | - 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir . '/../lib/BackgroundJobs/Rotate.php', |
|
24 | - 'OCA\\AdminAudit\\IAuditLogger' => $baseDir . '/../lib/IAuditLogger.php', |
|
25 | - 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => $baseDir . '/../lib/Listener/CriticalActionPerformedEventListener.php', |
|
9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
10 | + 'OCA\\AdminAudit\\Actions\\Action' => $baseDir.'/../lib/Actions/Action.php', |
|
11 | + 'OCA\\AdminAudit\\Actions\\AppManagement' => $baseDir.'/../lib/Actions/AppManagement.php', |
|
12 | + 'OCA\\AdminAudit\\Actions\\Auth' => $baseDir.'/../lib/Actions/Auth.php', |
|
13 | + 'OCA\\AdminAudit\\Actions\\Console' => $baseDir.'/../lib/Actions/Console.php', |
|
14 | + 'OCA\\AdminAudit\\Actions\\Files' => $baseDir.'/../lib/Actions/Files.php', |
|
15 | + 'OCA\\AdminAudit\\Actions\\GroupManagement' => $baseDir.'/../lib/Actions/GroupManagement.php', |
|
16 | + 'OCA\\AdminAudit\\Actions\\Security' => $baseDir.'/../lib/Actions/Security.php', |
|
17 | + 'OCA\\AdminAudit\\Actions\\Sharing' => $baseDir.'/../lib/Actions/Sharing.php', |
|
18 | + 'OCA\\AdminAudit\\Actions\\Trashbin' => $baseDir.'/../lib/Actions/Trashbin.php', |
|
19 | + 'OCA\\AdminAudit\\Actions\\UserManagement' => $baseDir.'/../lib/Actions/UserManagement.php', |
|
20 | + 'OCA\\AdminAudit\\Actions\\Versions' => $baseDir.'/../lib/Actions/Versions.php', |
|
21 | + 'OCA\\AdminAudit\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
22 | + 'OCA\\AdminAudit\\AuditLogger' => $baseDir.'/../lib/AuditLogger.php', |
|
23 | + 'OCA\\AdminAudit\\BackgroundJobs\\Rotate' => $baseDir.'/../lib/BackgroundJobs/Rotate.php', |
|
24 | + 'OCA\\AdminAudit\\IAuditLogger' => $baseDir.'/../lib/IAuditLogger.php', |
|
25 | + 'OCA\\AdminAudit\\Listener\\CriticalActionPerformedEventListener' => $baseDir.'/../lib/Listener/CriticalActionPerformedEventListener.php', |
|
26 | 26 | ); |