@@ -145,15 +145,15 @@ discard block |
||
145 | 145 | if ($scssFile === 'highcontrast' && in_array('dark', $userValues)) { |
146 | 146 | $scssFile .= 'dark'; |
147 | 147 | } |
148 | - $imports .= '@import "' . $scssFile . '";'; |
|
148 | + $imports .= '@import "'.$scssFile.'";'; |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
152 | 152 | if ($imports !== '') { |
153 | 153 | $scss = new Compiler(); |
154 | 154 | $scss->setImportPaths([ |
155 | - $this->appRoot . '/css/', |
|
156 | - $this->serverRoot . '/core/css/' |
|
155 | + $this->appRoot.'/css/', |
|
156 | + $this->serverRoot.'/core/css/' |
|
157 | 157 | ]); |
158 | 158 | |
159 | 159 | // Continue after throw |
@@ -163,9 +163,9 @@ discard block |
||
163 | 163 | // Import theme, variables and compile css4 variables |
164 | 164 | try { |
165 | 165 | $css .= $scss->compile( |
166 | - $imports . |
|
167 | - $this->getInjectedVariables() . |
|
168 | - '@import "variables.scss";' . |
|
166 | + $imports. |
|
167 | + $this->getInjectedVariables(). |
|
168 | + '@import "variables.scss";'. |
|
169 | 169 | '@import "css-variables.scss";' |
170 | 170 | ); |
171 | 171 | } catch (ParserException $e) { |
@@ -178,21 +178,21 @@ discard block |
||
178 | 178 | |
179 | 179 | // Rebase all urls |
180 | 180 | $appWebRoot = substr($this->appRoot, strlen($this->serverRoot) - strlen(\OC::$WEBROOT)); |
181 | - $css = $this->rebaseUrls($css, $appWebRoot . '/css'); |
|
181 | + $css = $this->rebaseUrls($css, $appWebRoot.'/css'); |
|
182 | 182 | |
183 | 183 | if (in_array('dark', $userValues) && $this->iconsCacher->getCachedList() && $this->iconsCacher->getCachedList()->getSize() > 0) { |
184 | 184 | $iconsCss = $this->invertSvgIconsColor($this->iconsCacher->getCachedList()->getContent()); |
185 | - $css = $css . $iconsCss; |
|
185 | + $css = $css.$iconsCss; |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | $response = new DataDisplayResponse($css, Http::STATUS_OK, ['Content-Type' => 'text/css']); |
189 | 189 | |
190 | 190 | // Set cache control |
191 | 191 | $ttl = 31536000; |
192 | - $response->addHeader('Cache-Control', 'max-age=' . $ttl . ', immutable'); |
|
192 | + $response->addHeader('Cache-Control', 'max-age='.$ttl.', immutable'); |
|
193 | 193 | $expires = new \DateTime(); |
194 | 194 | $expires->setTimestamp($this->timeFactory->getTime()); |
195 | - $expires->add(new \DateInterval('PT' . $ttl . 'S')); |
|
195 | + $expires->add(new \DateInterval('PT'.$ttl.'S')); |
|
196 | 196 | $response->addHeader('Expires', $expires->format(\DateTime::RFC1123)); |
197 | 197 | $response->addHeader('Pragma', 'cache'); |
198 | 198 | |
@@ -222,16 +222,16 @@ discard block |
||
222 | 222 | if ($theme !== false) { |
223 | 223 | $responseJS = '(function() { |
224 | 224 | OCA.Accessibility = { |
225 | - highcontrast: ' . json_encode($highcontrast) . ', |
|
226 | - theme: ' . json_encode($theme) . ', |
|
225 | + highcontrast: ' . json_encode($highcontrast).', |
|
226 | + theme: ' . json_encode($theme).', |
|
227 | 227 | }; |
228 | - document.body.classList.add(' . json_encode($theme) . '); |
|
228 | + document.body.classList.add(' . json_encode($theme).'); |
|
229 | 229 | })();'; |
230 | 230 | } else { |
231 | 231 | $responseJS = '(function() { |
232 | 232 | OCA.Accessibility = { |
233 | - highcontrast: ' . json_encode($highcontrast) . ', |
|
234 | - theme: ' . json_encode($theme) . ', |
|
233 | + highcontrast: ' . json_encode($highcontrast).', |
|
234 | + theme: ' . json_encode($theme).', |
|
235 | 235 | }; |
236 | 236 | })();'; |
237 | 237 | } |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | */ |
274 | 274 | private function rebaseUrls(string $css, string $webDir): string { |
275 | 275 | $re = '/url\([\'"]([^\/][\.\w?=\/-]*)[\'"]\)/x'; |
276 | - $subst = 'url(\'' . $webDir . '/$1\')'; |
|
276 | + $subst = 'url(\''.$webDir.'/$1\')'; |
|
277 | 277 | |
278 | 278 | return preg_replace($re, $subst, $css); |
279 | 279 | } |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | } |
306 | 306 | $variables = ''; |
307 | 307 | foreach ($this->defaults->getScssVariables() as $key => $value) { |
308 | - $variables .= '$' . $key . ': ' . $value . ';'; |
|
308 | + $variables .= '$'.$key.': '.$value.';'; |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | // check for valid variables / otherwise fall back to defaults |
@@ -54,7 +54,7 @@ |
||
54 | 54 | $this->providerInstances[] = $this->serverContainer->query($provider); |
55 | 55 | } catch (QueryException $e) { |
56 | 56 | $this->logger->logException($e, [ |
57 | - 'message' => "Could not query resource provider $provider: " . $e->getMessage() |
|
57 | + 'message' => "Could not query resource provider $provider: ".$e->getMessage() |
|
58 | 58 | ]); |
59 | 59 | } |
60 | 60 | } |
@@ -6,71 +6,71 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitFiles |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\Files\\' => 10, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\Files\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\Files\\Activity\\FavoriteProvider' => __DIR__ . '/..' . '/../lib/Activity/FavoriteProvider.php', |
|
25 | - 'OCA\\Files\\Activity\\Filter\\Favorites' => __DIR__ . '/..' . '/../lib/Activity/Filter/Favorites.php', |
|
26 | - 'OCA\\Files\\Activity\\Filter\\FileChanges' => __DIR__ . '/..' . '/../lib/Activity/Filter/FileChanges.php', |
|
27 | - 'OCA\\Files\\Activity\\Helper' => __DIR__ . '/..' . '/../lib/Activity/Helper.php', |
|
28 | - 'OCA\\Files\\Activity\\Provider' => __DIR__ . '/..' . '/../lib/Activity/Provider.php', |
|
29 | - 'OCA\\Files\\Activity\\Settings\\FavoriteAction' => __DIR__ . '/..' . '/../lib/Activity/Settings/FavoriteAction.php', |
|
30 | - 'OCA\\Files\\Activity\\Settings\\FileChanged' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileChanged.php', |
|
31 | - 'OCA\\Files\\Activity\\Settings\\FileCreated' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileCreated.php', |
|
32 | - 'OCA\\Files\\Activity\\Settings\\FileDeleted' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileDeleted.php', |
|
33 | - 'OCA\\Files\\Activity\\Settings\\FileFavorite' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileFavorite.php', |
|
34 | - 'OCA\\Files\\Activity\\Settings\\FileRestored' => __DIR__ . '/..' . '/../lib/Activity/Settings/FileRestored.php', |
|
35 | - 'OCA\\Files\\App' => __DIR__ . '/..' . '/../lib/App.php', |
|
36 | - 'OCA\\Files\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
37 | - 'OCA\\Files\\BackgroundJob\\CleanupDirectEditingTokens' => __DIR__ . '/..' . '/../lib/BackgroundJob/CleanupDirectEditingTokens.php', |
|
38 | - 'OCA\\Files\\BackgroundJob\\CleanupFileLocks' => __DIR__ . '/..' . '/../lib/BackgroundJob/CleanupFileLocks.php', |
|
39 | - 'OCA\\Files\\BackgroundJob\\DeleteOrphanedItems' => __DIR__ . '/..' . '/../lib/BackgroundJob/DeleteOrphanedItems.php', |
|
40 | - 'OCA\\Files\\BackgroundJob\\ScanFiles' => __DIR__ . '/..' . '/../lib/BackgroundJob/ScanFiles.php', |
|
41 | - 'OCA\\Files\\BackgroundJob\\TransferOwnership' => __DIR__ . '/..' . '/../lib/BackgroundJob/TransferOwnership.php', |
|
42 | - 'OCA\\Files\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php', |
|
43 | - 'OCA\\Files\\Collaboration\\Resources\\Listener' => __DIR__ . '/..' . '/../lib/Collaboration/Resources/Listener.php', |
|
44 | - 'OCA\\Files\\Collaboration\\Resources\\ResourceProvider' => __DIR__ . '/..' . '/../lib/Collaboration/Resources/ResourceProvider.php', |
|
45 | - 'OCA\\Files\\Command\\DeleteOrphanedFiles' => __DIR__ . '/..' . '/../lib/Command/DeleteOrphanedFiles.php', |
|
46 | - 'OCA\\Files\\Command\\Scan' => __DIR__ . '/..' . '/../lib/Command/Scan.php', |
|
47 | - 'OCA\\Files\\Command\\ScanAppData' => __DIR__ . '/..' . '/../lib/Command/ScanAppData.php', |
|
48 | - 'OCA\\Files\\Command\\TransferOwnership' => __DIR__ . '/..' . '/../lib/Command/TransferOwnership.php', |
|
49 | - 'OCA\\Files\\Controller\\AjaxController' => __DIR__ . '/..' . '/../lib/Controller/AjaxController.php', |
|
50 | - 'OCA\\Files\\Controller\\ApiController' => __DIR__ . '/..' . '/../lib/Controller/ApiController.php', |
|
51 | - 'OCA\\Files\\Controller\\DirectEditingController' => __DIR__ . '/..' . '/../lib/Controller/DirectEditingController.php', |
|
52 | - 'OCA\\Files\\Controller\\DirectEditingViewController' => __DIR__ . '/..' . '/../lib/Controller/DirectEditingViewController.php', |
|
53 | - 'OCA\\Files\\Controller\\TransferOwnershipController' => __DIR__ . '/..' . '/../lib/Controller/TransferOwnershipController.php', |
|
54 | - 'OCA\\Files\\Controller\\ViewController' => __DIR__ . '/..' . '/../lib/Controller/ViewController.php', |
|
55 | - 'OCA\\Files\\Db\\TransferOwnership' => __DIR__ . '/..' . '/../lib/Db/TransferOwnership.php', |
|
56 | - 'OCA\\Files\\Db\\TransferOwnershipMapper' => __DIR__ . '/..' . '/../lib/Db/TransferOwnershipMapper.php', |
|
57 | - 'OCA\\Files\\Event\\LoadAdditionalScriptsEvent' => __DIR__ . '/..' . '/../lib/Event/LoadAdditionalScriptsEvent.php', |
|
58 | - 'OCA\\Files\\Event\\LoadSidebar' => __DIR__ . '/..' . '/../lib/Event/LoadSidebar.php', |
|
59 | - 'OCA\\Files\\Exception\\TransferOwnershipException' => __DIR__ . '/..' . '/../lib/Exception/TransferOwnershipException.php', |
|
60 | - 'OCA\\Files\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php', |
|
61 | - 'OCA\\Files\\Listener\\LegacyLoadAdditionalScriptsAdapter' => __DIR__ . '/..' . '/../lib/Listener/LegacyLoadAdditionalScriptsAdapter.php', |
|
62 | - 'OCA\\Files\\Listener\\LoadSidebarListener' => __DIR__ . '/..' . '/../lib/Listener/LoadSidebarListener.php', |
|
63 | - 'OCA\\Files\\Migration\\Version11301Date20191205150729' => __DIR__ . '/..' . '/../lib/Migration/Version11301Date20191205150729.php', |
|
64 | - 'OCA\\Files\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', |
|
65 | - 'OCA\\Files\\Service\\DirectEditingService' => __DIR__ . '/..' . '/../lib/Service/DirectEditingService.php', |
|
66 | - 'OCA\\Files\\Service\\OwnershipTransferService' => __DIR__ . '/..' . '/../lib/Service/OwnershipTransferService.php', |
|
67 | - 'OCA\\Files\\Service\\TagService' => __DIR__ . '/..' . '/../lib/Service/TagService.php', |
|
68 | - 'OCA\\Files\\Settings\\PersonalSettings' => __DIR__ . '/..' . '/../lib/Settings/PersonalSettings.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\Files\\Activity\\FavoriteProvider' => __DIR__.'/..'.'/../lib/Activity/FavoriteProvider.php', |
|
25 | + 'OCA\\Files\\Activity\\Filter\\Favorites' => __DIR__.'/..'.'/../lib/Activity/Filter/Favorites.php', |
|
26 | + 'OCA\\Files\\Activity\\Filter\\FileChanges' => __DIR__.'/..'.'/../lib/Activity/Filter/FileChanges.php', |
|
27 | + 'OCA\\Files\\Activity\\Helper' => __DIR__.'/..'.'/../lib/Activity/Helper.php', |
|
28 | + 'OCA\\Files\\Activity\\Provider' => __DIR__.'/..'.'/../lib/Activity/Provider.php', |
|
29 | + 'OCA\\Files\\Activity\\Settings\\FavoriteAction' => __DIR__.'/..'.'/../lib/Activity/Settings/FavoriteAction.php', |
|
30 | + 'OCA\\Files\\Activity\\Settings\\FileChanged' => __DIR__.'/..'.'/../lib/Activity/Settings/FileChanged.php', |
|
31 | + 'OCA\\Files\\Activity\\Settings\\FileCreated' => __DIR__.'/..'.'/../lib/Activity/Settings/FileCreated.php', |
|
32 | + 'OCA\\Files\\Activity\\Settings\\FileDeleted' => __DIR__.'/..'.'/../lib/Activity/Settings/FileDeleted.php', |
|
33 | + 'OCA\\Files\\Activity\\Settings\\FileFavorite' => __DIR__.'/..'.'/../lib/Activity/Settings/FileFavorite.php', |
|
34 | + 'OCA\\Files\\Activity\\Settings\\FileRestored' => __DIR__.'/..'.'/../lib/Activity/Settings/FileRestored.php', |
|
35 | + 'OCA\\Files\\App' => __DIR__.'/..'.'/../lib/App.php', |
|
36 | + 'OCA\\Files\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
37 | + 'OCA\\Files\\BackgroundJob\\CleanupDirectEditingTokens' => __DIR__.'/..'.'/../lib/BackgroundJob/CleanupDirectEditingTokens.php', |
|
38 | + 'OCA\\Files\\BackgroundJob\\CleanupFileLocks' => __DIR__.'/..'.'/../lib/BackgroundJob/CleanupFileLocks.php', |
|
39 | + 'OCA\\Files\\BackgroundJob\\DeleteOrphanedItems' => __DIR__.'/..'.'/../lib/BackgroundJob/DeleteOrphanedItems.php', |
|
40 | + 'OCA\\Files\\BackgroundJob\\ScanFiles' => __DIR__.'/..'.'/../lib/BackgroundJob/ScanFiles.php', |
|
41 | + 'OCA\\Files\\BackgroundJob\\TransferOwnership' => __DIR__.'/..'.'/../lib/BackgroundJob/TransferOwnership.php', |
|
42 | + 'OCA\\Files\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php', |
|
43 | + 'OCA\\Files\\Collaboration\\Resources\\Listener' => __DIR__.'/..'.'/../lib/Collaboration/Resources/Listener.php', |
|
44 | + 'OCA\\Files\\Collaboration\\Resources\\ResourceProvider' => __DIR__.'/..'.'/../lib/Collaboration/Resources/ResourceProvider.php', |
|
45 | + 'OCA\\Files\\Command\\DeleteOrphanedFiles' => __DIR__.'/..'.'/../lib/Command/DeleteOrphanedFiles.php', |
|
46 | + 'OCA\\Files\\Command\\Scan' => __DIR__.'/..'.'/../lib/Command/Scan.php', |
|
47 | + 'OCA\\Files\\Command\\ScanAppData' => __DIR__.'/..'.'/../lib/Command/ScanAppData.php', |
|
48 | + 'OCA\\Files\\Command\\TransferOwnership' => __DIR__.'/..'.'/../lib/Command/TransferOwnership.php', |
|
49 | + 'OCA\\Files\\Controller\\AjaxController' => __DIR__.'/..'.'/../lib/Controller/AjaxController.php', |
|
50 | + 'OCA\\Files\\Controller\\ApiController' => __DIR__.'/..'.'/../lib/Controller/ApiController.php', |
|
51 | + 'OCA\\Files\\Controller\\DirectEditingController' => __DIR__.'/..'.'/../lib/Controller/DirectEditingController.php', |
|
52 | + 'OCA\\Files\\Controller\\DirectEditingViewController' => __DIR__.'/..'.'/../lib/Controller/DirectEditingViewController.php', |
|
53 | + 'OCA\\Files\\Controller\\TransferOwnershipController' => __DIR__.'/..'.'/../lib/Controller/TransferOwnershipController.php', |
|
54 | + 'OCA\\Files\\Controller\\ViewController' => __DIR__.'/..'.'/../lib/Controller/ViewController.php', |
|
55 | + 'OCA\\Files\\Db\\TransferOwnership' => __DIR__.'/..'.'/../lib/Db/TransferOwnership.php', |
|
56 | + 'OCA\\Files\\Db\\TransferOwnershipMapper' => __DIR__.'/..'.'/../lib/Db/TransferOwnershipMapper.php', |
|
57 | + 'OCA\\Files\\Event\\LoadAdditionalScriptsEvent' => __DIR__.'/..'.'/../lib/Event/LoadAdditionalScriptsEvent.php', |
|
58 | + 'OCA\\Files\\Event\\LoadSidebar' => __DIR__.'/..'.'/../lib/Event/LoadSidebar.php', |
|
59 | + 'OCA\\Files\\Exception\\TransferOwnershipException' => __DIR__.'/..'.'/../lib/Exception/TransferOwnershipException.php', |
|
60 | + 'OCA\\Files\\Helper' => __DIR__.'/..'.'/../lib/Helper.php', |
|
61 | + 'OCA\\Files\\Listener\\LegacyLoadAdditionalScriptsAdapter' => __DIR__.'/..'.'/../lib/Listener/LegacyLoadAdditionalScriptsAdapter.php', |
|
62 | + 'OCA\\Files\\Listener\\LoadSidebarListener' => __DIR__.'/..'.'/../lib/Listener/LoadSidebarListener.php', |
|
63 | + 'OCA\\Files\\Migration\\Version11301Date20191205150729' => __DIR__.'/..'.'/../lib/Migration/Version11301Date20191205150729.php', |
|
64 | + 'OCA\\Files\\Notification\\Notifier' => __DIR__.'/..'.'/../lib/Notification/Notifier.php', |
|
65 | + 'OCA\\Files\\Service\\DirectEditingService' => __DIR__.'/..'.'/../lib/Service/DirectEditingService.php', |
|
66 | + 'OCA\\Files\\Service\\OwnershipTransferService' => __DIR__.'/..'.'/../lib/Service/OwnershipTransferService.php', |
|
67 | + 'OCA\\Files\\Service\\TagService' => __DIR__.'/..'.'/../lib/Service/TagService.php', |
|
68 | + 'OCA\\Files\\Settings\\PersonalSettings' => __DIR__.'/..'.'/../lib/Settings/PersonalSettings.php', |
|
69 | 69 | ); |
70 | 70 | |
71 | 71 | public static function getInitializer(ClassLoader $loader) |
72 | 72 | { |
73 | - return \Closure::bind(function () use ($loader) { |
|
73 | + return \Closure::bind(function() use ($loader) { |
|
74 | 74 | $loader->prefixLengthsPsr4 = ComposerStaticInitFiles::$prefixLengthsPsr4; |
75 | 75 | $loader->prefixDirsPsr4 = ComposerStaticInitFiles::$prefixDirsPsr4; |
76 | 76 | $loader->classMap = ComposerStaticInitFiles::$classMap; |
@@ -6,49 +6,49 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\Files\\Activity\\FavoriteProvider' => $baseDir . '/../lib/Activity/FavoriteProvider.php', |
|
10 | - 'OCA\\Files\\Activity\\Filter\\Favorites' => $baseDir . '/../lib/Activity/Filter/Favorites.php', |
|
11 | - 'OCA\\Files\\Activity\\Filter\\FileChanges' => $baseDir . '/../lib/Activity/Filter/FileChanges.php', |
|
12 | - 'OCA\\Files\\Activity\\Helper' => $baseDir . '/../lib/Activity/Helper.php', |
|
13 | - 'OCA\\Files\\Activity\\Provider' => $baseDir . '/../lib/Activity/Provider.php', |
|
14 | - 'OCA\\Files\\Activity\\Settings\\FavoriteAction' => $baseDir . '/../lib/Activity/Settings/FavoriteAction.php', |
|
15 | - 'OCA\\Files\\Activity\\Settings\\FileChanged' => $baseDir . '/../lib/Activity/Settings/FileChanged.php', |
|
16 | - 'OCA\\Files\\Activity\\Settings\\FileCreated' => $baseDir . '/../lib/Activity/Settings/FileCreated.php', |
|
17 | - 'OCA\\Files\\Activity\\Settings\\FileDeleted' => $baseDir . '/../lib/Activity/Settings/FileDeleted.php', |
|
18 | - 'OCA\\Files\\Activity\\Settings\\FileFavorite' => $baseDir . '/../lib/Activity/Settings/FileFavorite.php', |
|
19 | - 'OCA\\Files\\Activity\\Settings\\FileRestored' => $baseDir . '/../lib/Activity/Settings/FileRestored.php', |
|
20 | - 'OCA\\Files\\App' => $baseDir . '/../lib/App.php', |
|
21 | - 'OCA\\Files\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
22 | - 'OCA\\Files\\BackgroundJob\\CleanupDirectEditingTokens' => $baseDir . '/../lib/BackgroundJob/CleanupDirectEditingTokens.php', |
|
23 | - 'OCA\\Files\\BackgroundJob\\CleanupFileLocks' => $baseDir . '/../lib/BackgroundJob/CleanupFileLocks.php', |
|
24 | - 'OCA\\Files\\BackgroundJob\\DeleteOrphanedItems' => $baseDir . '/../lib/BackgroundJob/DeleteOrphanedItems.php', |
|
25 | - 'OCA\\Files\\BackgroundJob\\ScanFiles' => $baseDir . '/../lib/BackgroundJob/ScanFiles.php', |
|
26 | - 'OCA\\Files\\BackgroundJob\\TransferOwnership' => $baseDir . '/../lib/BackgroundJob/TransferOwnership.php', |
|
27 | - 'OCA\\Files\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
28 | - 'OCA\\Files\\Collaboration\\Resources\\Listener' => $baseDir . '/../lib/Collaboration/Resources/Listener.php', |
|
29 | - 'OCA\\Files\\Collaboration\\Resources\\ResourceProvider' => $baseDir . '/../lib/Collaboration/Resources/ResourceProvider.php', |
|
30 | - 'OCA\\Files\\Command\\DeleteOrphanedFiles' => $baseDir . '/../lib/Command/DeleteOrphanedFiles.php', |
|
31 | - 'OCA\\Files\\Command\\Scan' => $baseDir . '/../lib/Command/Scan.php', |
|
32 | - 'OCA\\Files\\Command\\ScanAppData' => $baseDir . '/../lib/Command/ScanAppData.php', |
|
33 | - 'OCA\\Files\\Command\\TransferOwnership' => $baseDir . '/../lib/Command/TransferOwnership.php', |
|
34 | - 'OCA\\Files\\Controller\\AjaxController' => $baseDir . '/../lib/Controller/AjaxController.php', |
|
35 | - 'OCA\\Files\\Controller\\ApiController' => $baseDir . '/../lib/Controller/ApiController.php', |
|
36 | - 'OCA\\Files\\Controller\\DirectEditingController' => $baseDir . '/../lib/Controller/DirectEditingController.php', |
|
37 | - 'OCA\\Files\\Controller\\DirectEditingViewController' => $baseDir . '/../lib/Controller/DirectEditingViewController.php', |
|
38 | - 'OCA\\Files\\Controller\\TransferOwnershipController' => $baseDir . '/../lib/Controller/TransferOwnershipController.php', |
|
39 | - 'OCA\\Files\\Controller\\ViewController' => $baseDir . '/../lib/Controller/ViewController.php', |
|
40 | - 'OCA\\Files\\Db\\TransferOwnership' => $baseDir . '/../lib/Db/TransferOwnership.php', |
|
41 | - 'OCA\\Files\\Db\\TransferOwnershipMapper' => $baseDir . '/../lib/Db/TransferOwnershipMapper.php', |
|
42 | - 'OCA\\Files\\Event\\LoadAdditionalScriptsEvent' => $baseDir . '/../lib/Event/LoadAdditionalScriptsEvent.php', |
|
43 | - 'OCA\\Files\\Event\\LoadSidebar' => $baseDir . '/../lib/Event/LoadSidebar.php', |
|
44 | - 'OCA\\Files\\Exception\\TransferOwnershipException' => $baseDir . '/../lib/Exception/TransferOwnershipException.php', |
|
45 | - 'OCA\\Files\\Helper' => $baseDir . '/../lib/Helper.php', |
|
46 | - 'OCA\\Files\\Listener\\LegacyLoadAdditionalScriptsAdapter' => $baseDir . '/../lib/Listener/LegacyLoadAdditionalScriptsAdapter.php', |
|
47 | - 'OCA\\Files\\Listener\\LoadSidebarListener' => $baseDir . '/../lib/Listener/LoadSidebarListener.php', |
|
48 | - 'OCA\\Files\\Migration\\Version11301Date20191205150729' => $baseDir . '/../lib/Migration/Version11301Date20191205150729.php', |
|
49 | - 'OCA\\Files\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', |
|
50 | - 'OCA\\Files\\Service\\DirectEditingService' => $baseDir . '/../lib/Service/DirectEditingService.php', |
|
51 | - 'OCA\\Files\\Service\\OwnershipTransferService' => $baseDir . '/../lib/Service/OwnershipTransferService.php', |
|
52 | - 'OCA\\Files\\Service\\TagService' => $baseDir . '/../lib/Service/TagService.php', |
|
53 | - 'OCA\\Files\\Settings\\PersonalSettings' => $baseDir . '/../lib/Settings/PersonalSettings.php', |
|
9 | + 'OCA\\Files\\Activity\\FavoriteProvider' => $baseDir.'/../lib/Activity/FavoriteProvider.php', |
|
10 | + 'OCA\\Files\\Activity\\Filter\\Favorites' => $baseDir.'/../lib/Activity/Filter/Favorites.php', |
|
11 | + 'OCA\\Files\\Activity\\Filter\\FileChanges' => $baseDir.'/../lib/Activity/Filter/FileChanges.php', |
|
12 | + 'OCA\\Files\\Activity\\Helper' => $baseDir.'/../lib/Activity/Helper.php', |
|
13 | + 'OCA\\Files\\Activity\\Provider' => $baseDir.'/../lib/Activity/Provider.php', |
|
14 | + 'OCA\\Files\\Activity\\Settings\\FavoriteAction' => $baseDir.'/../lib/Activity/Settings/FavoriteAction.php', |
|
15 | + 'OCA\\Files\\Activity\\Settings\\FileChanged' => $baseDir.'/../lib/Activity/Settings/FileChanged.php', |
|
16 | + 'OCA\\Files\\Activity\\Settings\\FileCreated' => $baseDir.'/../lib/Activity/Settings/FileCreated.php', |
|
17 | + 'OCA\\Files\\Activity\\Settings\\FileDeleted' => $baseDir.'/../lib/Activity/Settings/FileDeleted.php', |
|
18 | + 'OCA\\Files\\Activity\\Settings\\FileFavorite' => $baseDir.'/../lib/Activity/Settings/FileFavorite.php', |
|
19 | + 'OCA\\Files\\Activity\\Settings\\FileRestored' => $baseDir.'/../lib/Activity/Settings/FileRestored.php', |
|
20 | + 'OCA\\Files\\App' => $baseDir.'/../lib/App.php', |
|
21 | + 'OCA\\Files\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
22 | + 'OCA\\Files\\BackgroundJob\\CleanupDirectEditingTokens' => $baseDir.'/../lib/BackgroundJob/CleanupDirectEditingTokens.php', |
|
23 | + 'OCA\\Files\\BackgroundJob\\CleanupFileLocks' => $baseDir.'/../lib/BackgroundJob/CleanupFileLocks.php', |
|
24 | + 'OCA\\Files\\BackgroundJob\\DeleteOrphanedItems' => $baseDir.'/../lib/BackgroundJob/DeleteOrphanedItems.php', |
|
25 | + 'OCA\\Files\\BackgroundJob\\ScanFiles' => $baseDir.'/../lib/BackgroundJob/ScanFiles.php', |
|
26 | + 'OCA\\Files\\BackgroundJob\\TransferOwnership' => $baseDir.'/../lib/BackgroundJob/TransferOwnership.php', |
|
27 | + 'OCA\\Files\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
28 | + 'OCA\\Files\\Collaboration\\Resources\\Listener' => $baseDir.'/../lib/Collaboration/Resources/Listener.php', |
|
29 | + 'OCA\\Files\\Collaboration\\Resources\\ResourceProvider' => $baseDir.'/../lib/Collaboration/Resources/ResourceProvider.php', |
|
30 | + 'OCA\\Files\\Command\\DeleteOrphanedFiles' => $baseDir.'/../lib/Command/DeleteOrphanedFiles.php', |
|
31 | + 'OCA\\Files\\Command\\Scan' => $baseDir.'/../lib/Command/Scan.php', |
|
32 | + 'OCA\\Files\\Command\\ScanAppData' => $baseDir.'/../lib/Command/ScanAppData.php', |
|
33 | + 'OCA\\Files\\Command\\TransferOwnership' => $baseDir.'/../lib/Command/TransferOwnership.php', |
|
34 | + 'OCA\\Files\\Controller\\AjaxController' => $baseDir.'/../lib/Controller/AjaxController.php', |
|
35 | + 'OCA\\Files\\Controller\\ApiController' => $baseDir.'/../lib/Controller/ApiController.php', |
|
36 | + 'OCA\\Files\\Controller\\DirectEditingController' => $baseDir.'/../lib/Controller/DirectEditingController.php', |
|
37 | + 'OCA\\Files\\Controller\\DirectEditingViewController' => $baseDir.'/../lib/Controller/DirectEditingViewController.php', |
|
38 | + 'OCA\\Files\\Controller\\TransferOwnershipController' => $baseDir.'/../lib/Controller/TransferOwnershipController.php', |
|
39 | + 'OCA\\Files\\Controller\\ViewController' => $baseDir.'/../lib/Controller/ViewController.php', |
|
40 | + 'OCA\\Files\\Db\\TransferOwnership' => $baseDir.'/../lib/Db/TransferOwnership.php', |
|
41 | + 'OCA\\Files\\Db\\TransferOwnershipMapper' => $baseDir.'/../lib/Db/TransferOwnershipMapper.php', |
|
42 | + 'OCA\\Files\\Event\\LoadAdditionalScriptsEvent' => $baseDir.'/../lib/Event/LoadAdditionalScriptsEvent.php', |
|
43 | + 'OCA\\Files\\Event\\LoadSidebar' => $baseDir.'/../lib/Event/LoadSidebar.php', |
|
44 | + 'OCA\\Files\\Exception\\TransferOwnershipException' => $baseDir.'/../lib/Exception/TransferOwnershipException.php', |
|
45 | + 'OCA\\Files\\Helper' => $baseDir.'/../lib/Helper.php', |
|
46 | + 'OCA\\Files\\Listener\\LegacyLoadAdditionalScriptsAdapter' => $baseDir.'/../lib/Listener/LegacyLoadAdditionalScriptsAdapter.php', |
|
47 | + 'OCA\\Files\\Listener\\LoadSidebarListener' => $baseDir.'/../lib/Listener/LoadSidebarListener.php', |
|
48 | + 'OCA\\Files\\Migration\\Version11301Date20191205150729' => $baseDir.'/../lib/Migration/Version11301Date20191205150729.php', |
|
49 | + 'OCA\\Files\\Notification\\Notifier' => $baseDir.'/../lib/Notification/Notifier.php', |
|
50 | + 'OCA\\Files\\Service\\DirectEditingService' => $baseDir.'/../lib/Service/DirectEditingService.php', |
|
51 | + 'OCA\\Files\\Service\\OwnershipTransferService' => $baseDir.'/../lib/Service/OwnershipTransferService.php', |
|
52 | + 'OCA\\Files\\Service\\TagService' => $baseDir.'/../lib/Service/TagService.php', |
|
53 | + 'OCA\\Files\\Settings\\PersonalSettings' => $baseDir.'/../lib/Settings/PersonalSettings.php', |
|
54 | 54 | ); |
@@ -77,7 +77,7 @@ |
||
77 | 77 | } |
78 | 78 | $pos = strpos($ip, '%'); // if there is an explicit interface added to the IP, e.g. fe80::ae2d:d1e7:fe1e:9a8d%enp2s0 |
79 | 79 | if ($pos !== false) { |
80 | - $ip = substr($ip, 0, $pos-1); |
|
80 | + $ip = substr($ip, 0, $pos - 1); |
|
81 | 81 | } |
82 | 82 | $binary = \inet_pton($ip); |
83 | 83 | for ($i = 128; $i > $maskBits; $i -= 8) { |
@@ -123,12 +123,12 @@ discard block |
||
123 | 123 | } |
124 | 124 | |
125 | 125 | private function loadCustomDefinitions(string $fileName, array $definitions): array { |
126 | - if (file_exists($this->customConfigDir . '/' . $fileName)) { |
|
127 | - $custom = json_decode(file_get_contents($this->customConfigDir . '/' . $fileName), true); |
|
126 | + if (file_exists($this->customConfigDir.'/'.$fileName)) { |
|
127 | + $custom = json_decode(file_get_contents($this->customConfigDir.'/'.$fileName), true); |
|
128 | 128 | if (json_last_error() === JSON_ERROR_NONE) { |
129 | 129 | $definitions = array_merge($definitions, $custom); |
130 | 130 | } else { |
131 | - $this->logger->warning('Failed to parse ' . $fileName . ': ' . json_last_error_msg()); |
|
131 | + $this->logger->warning('Failed to parse '.$fileName.': '.json_last_error_msg()); |
|
132 | 132 | } |
133 | 133 | } |
134 | 134 | return $definitions; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | return; |
143 | 143 | } |
144 | 144 | |
145 | - $this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypealiases.dist.json'), true); |
|
145 | + $this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypealiases.dist.json'), true); |
|
146 | 146 | $this->mimeTypeAlias = $this->loadCustomDefinitions(self::CUSTOM_MIMETYPEALIASES, $this->mimeTypeAlias); |
147 | 147 | } |
148 | 148 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | public function getOnlyDefaultAliases(): array { |
158 | 158 | $this->loadMappings(); |
159 | - $this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypealiases.dist.json'), true); |
|
159 | + $this->mimeTypeAlias = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypealiases.dist.json'), true); |
|
160 | 160 | return $this->mimeTypeAlias; |
161 | 161 | } |
162 | 162 | |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | return; |
169 | 169 | } |
170 | 170 | |
171 | - $mimetypeMapping = json_decode(file_get_contents($this->defaultConfigDir . '/mimetypemapping.dist.json'), true); |
|
171 | + $mimetypeMapping = json_decode(file_get_contents($this->defaultConfigDir.'/mimetypemapping.dist.json'), true); |
|
172 | 172 | $mimetypeMapping = $this->loadCustomDefinitions(self::CUSTOM_MIMETYPEMAPPING, $mimetypeMapping); |
173 | 173 | |
174 | 174 | $this->registerTypeArray($mimetypeMapping); |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | |
365 | 365 | // Icon exists? |
366 | 366 | try { |
367 | - $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $icon . '.svg'); |
|
367 | + $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/'.$icon.'.svg'); |
|
368 | 368 | return $this->mimetypeIcons[$mimetype]; |
369 | 369 | } catch (\RuntimeException $e) { |
370 | 370 | // Specified image not found |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | // Try only the first part of the filetype |
374 | 374 | $mimePart = substr($icon, 0, strpos($icon, '-')); |
375 | 375 | try { |
376 | - $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $mimePart . '.svg'); |
|
376 | + $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/'.$mimePart.'.svg'); |
|
377 | 377 | return $this->mimetypeIcons[$mimetype]; |
378 | 378 | } catch (\RuntimeException $e) { |
379 | 379 | // Image for the first part of the mimetype not found |
@@ -105,7 +105,7 @@ |
||
105 | 105 | $suffix = '…'; |
106 | 106 | } |
107 | 107 | |
108 | - return $prefix . mb_substr($message, $start, $end - $start) . $suffix; |
|
108 | + return $prefix.mb_substr($message, $start, $end - $start).$suffix; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $this->urlGenerator->getAbsoluteURL( |
121 | 121 | $this->urlGenerator->linkTo( |
122 | 122 | '', |
123 | - 'ocs/v2.php/apps/files/api/v1/transferownership/' . $id |
|
123 | + 'ocs/v2.php/apps/files/api/v1/transferownership/'.$id |
|
124 | 124 | ) |
125 | 125 | ), |
126 | 126 | IAction::TYPE_POST |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $this->urlGenerator->getAbsoluteURL( |
134 | 134 | $this->urlGenerator->linkTo( |
135 | 135 | '', |
136 | - 'ocs/v2.php/apps/files/api/v1/transferownership/' . $id |
|
136 | + 'ocs/v2.php/apps/files/api/v1/transferownership/'.$id |
|
137 | 137 | ) |
138 | 138 | ), |
139 | 139 | IAction::TYPE_DELETE |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | [ |
157 | 157 | 'path' => [ |
158 | 158 | 'type' => 'highlight', |
159 | - 'id' => $param['targetUser'] . '::' . $param['nodeName'], |
|
159 | + 'id' => $param['targetUser'].'::'.$param['nodeName'], |
|
160 | 160 | 'name' => $param['nodeName'], |
161 | 161 | ] |
162 | 162 | ]) |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | return $notification; |
166 | 166 | } |
167 | 167 | |
168 | - public function handleTransferOwnershipFailedSource(INotification $notification, string $languageCode): INotification { |
|
168 | + public function handleTransferOwnershipFailedSource(INotification $notification, string $languageCode): INotification { |
|
169 | 169 | $l = $this->l10nFactory->get('files', $languageCode); |
170 | 170 | $param = $notification->getSubjectParameters(); |
171 | 171 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | [ |
178 | 178 | 'path' => [ |
179 | 179 | 'type' => 'highlight', |
180 | - 'id' => $param['targetUser'] . '::' . $param['nodeName'], |
|
180 | + 'id' => $param['targetUser'].'::'.$param['nodeName'], |
|
181 | 181 | 'name' => $param['nodeName'], |
182 | 182 | ], |
183 | 183 | 'user' => [ |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | return $notification; |
191 | 191 | } |
192 | 192 | |
193 | - public function handleTransferOwnershipFailedTarget(INotification $notification, string $languageCode): INotification { |
|
193 | + public function handleTransferOwnershipFailedTarget(INotification $notification, string $languageCode): INotification { |
|
194 | 194 | $l = $this->l10nFactory->get('files', $languageCode); |
195 | 195 | $param = $notification->getSubjectParameters(); |
196 | 196 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | [ |
203 | 203 | 'path' => [ |
204 | 204 | 'type' => 'highlight', |
205 | - 'id' => $param['sourceUser'] . '::' . $param['nodeName'], |
|
205 | + 'id' => $param['sourceUser'].'::'.$param['nodeName'], |
|
206 | 206 | 'name' => $param['nodeName'], |
207 | 207 | ], |
208 | 208 | 'user' => [ |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | return $notification; |
217 | 217 | } |
218 | 218 | |
219 | - public function handleTransferOwnershipDoneSource(INotification $notification, string $languageCode): INotification { |
|
219 | + public function handleTransferOwnershipDoneSource(INotification $notification, string $languageCode): INotification { |
|
220 | 220 | $l = $this->l10nFactory->get('files', $languageCode); |
221 | 221 | $param = $notification->getSubjectParameters(); |
222 | 222 | |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | [ |
229 | 229 | 'path' => [ |
230 | 230 | 'type' => 'highlight', |
231 | - 'id' => $param['targetUser'] . '::' . $param['nodeName'], |
|
231 | + 'id' => $param['targetUser'].'::'.$param['nodeName'], |
|
232 | 232 | 'name' => $param['nodeName'], |
233 | 233 | ], |
234 | 234 | 'user' => [ |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | return $notification; |
243 | 243 | } |
244 | 244 | |
245 | - public function handleTransferOwnershipDoneTarget(INotification $notification, string $languageCode): INotification { |
|
245 | + public function handleTransferOwnershipDoneTarget(INotification $notification, string $languageCode): INotification { |
|
246 | 246 | $l = $this->l10nFactory->get('files', $languageCode); |
247 | 247 | $param = $notification->getSubjectParameters(); |
248 | 248 | |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | [ |
255 | 255 | 'path' => [ |
256 | 256 | 'type' => 'highlight', |
257 | - 'id' => $param['sourceUser'] . '::' . $param['nodeName'], |
|
257 | + 'id' => $param['sourceUser'].'::'.$param['nodeName'], |
|
258 | 258 | 'name' => $param['nodeName'], |
259 | 259 | ], |
260 | 260 | 'user' => [ |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | |
276 | 276 | // TODO: This should all be moved to a service that also the transferownershipContoller uses. |
277 | 277 | try { |
278 | - $transferOwnership = $this->mapper->getById((int)$notification->getObjectId()); |
|
278 | + $transferOwnership = $this->mapper->getById((int) $notification->getObjectId()); |
|
279 | 279 | } catch (DoesNotExistException $e) { |
280 | 280 | return; |
281 | 281 | } |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | 'targetUser' => $transferOwnership->getTargetUser(), |
290 | 290 | 'nodeName' => $transferOwnership->getNodeName() |
291 | 291 | ]) |
292 | - ->setObject('transfer', (string)$transferOwnership->getId()); |
|
292 | + ->setObject('transfer', (string) $transferOwnership->getId()); |
|
293 | 293 | $this->notificationManager->notify($notification); |
294 | 294 | |
295 | 295 | $this->mapper->delete($transferOwnership); |
@@ -49,20 +49,20 @@ |
||
49 | 49 | |
50 | 50 | $tmpDir = \OC::$server->getTempManager()->getTempBaseDir(); |
51 | 51 | |
52 | - $defaultParameters = ' -env:UserInstallation=file://' . escapeshellarg($tmpDir . '/owncloud-' . \OC_Util::getInstanceId() . '/') . ' --headless --nologo --nofirststartwizard --invisible --norestore --convert-to png --outdir '; |
|
52 | + $defaultParameters = ' -env:UserInstallation=file://'.escapeshellarg($tmpDir.'/owncloud-'.\OC_Util::getInstanceId().'/').' --headless --nologo --nofirststartwizard --invisible --norestore --convert-to png --outdir '; |
|
53 | 53 | $clParameters = \OC::$server->getConfig()->getSystemValue('preview_office_cl_parameters', $defaultParameters); |
54 | 54 | |
55 | - $exec = $this->cmd . $clParameters . escapeshellarg($tmpDir) . ' ' . escapeshellarg($absPath); |
|
55 | + $exec = $this->cmd.$clParameters.escapeshellarg($tmpDir).' '.escapeshellarg($absPath); |
|
56 | 56 | |
57 | 57 | shell_exec($exec); |
58 | 58 | |
59 | 59 | //create imagick object from png |
60 | 60 | $pngPreview = null; |
61 | 61 | try { |
62 | - list($dirname, , , $filename) = array_values(pathinfo($absPath)); |
|
63 | - $pngPreview = $tmpDir . '/' . $filename . '.png'; |
|
62 | + list($dirname,,, $filename) = array_values(pathinfo($absPath)); |
|
63 | + $pngPreview = $tmpDir.'/'.$filename.'.png'; |
|
64 | 64 | |
65 | - $png = new \imagick($pngPreview . '[0]'); |
|
65 | + $png = new \imagick($pngPreview.'[0]'); |
|
66 | 66 | $png->setImageFormat('jpg'); |
67 | 67 | } catch (\Exception $e) { |
68 | 68 | $this->cleanTmpFiles(); |