@@ -60,11 +60,11 @@ |
||
60 | 60 | // at least on PHP 5.6 usort turned out to be not stable. So we add |
61 | 61 | // the current index to the value and compare it on a draw |
62 | 62 | $i = 0; |
63 | - $workArray = array_map(function ($element) use (&$i) { |
|
63 | + $workArray = array_map(function($element) use (&$i) { |
|
64 | 64 | return [$i++, $element]; |
65 | 65 | }, $byType); |
66 | 66 | |
67 | - usort($workArray, function ($a, $b) use ($commenters, $type) { |
|
67 | + usort($workArray, function($a, $b) use ($commenters, $type) { |
|
68 | 68 | $r = $this->compare($a[1], $b[1], $commenters[$type]); |
69 | 69 | if ($r === 0) { |
70 | 70 | $r = $a[0] - $b[0]; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | return new NotFoundResponse(); |
113 | 113 | } |
114 | 114 | $userFolder = $this->rootFolder->getUserFolder($currentUser->getUID()); |
115 | - $files = $userFolder->getById((int)$comment->getObjectId()); |
|
115 | + $files = $userFolder->getById((int) $comment->getObjectId()); |
|
116 | 116 | |
117 | 117 | $this->markProcessed($comment, $currentUser); |
118 | 118 | |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | |
123 | 123 | $url = $this->urlGenerator->linkToRouteAbsolute( |
124 | 124 | 'files.viewcontroller.showFile', |
125 | - [ 'fileid' => $comment->getObjectId() ] |
|
125 | + ['fileid' => $comment->getObjectId()] |
|
126 | 126 | ); |
127 | 127 | |
128 | 128 | return new RedirectResponse($url); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | public static function pre_renameOrCopy_hook($params) { |
130 | 130 | // if we rename a movable mount point, then the versions don't have |
131 | 131 | // to be renamed |
132 | - $absOldPath = Filesystem::normalizePath('/' . \OCP\User::getUser() . '/files' . $params['oldpath']); |
|
132 | + $absOldPath = Filesystem::normalizePath('/'.\OCP\User::getUser().'/files'.$params['oldpath']); |
|
133 | 133 | $manager = Filesystem::getMountManager(); |
134 | 134 | $mount = $manager->find($absOldPath); |
135 | 135 | $internalPath = $mount->getInternalPath($absOldPath); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | return; |
138 | 138 | } |
139 | 139 | |
140 | - $view = new View(\OCP\User::getUser() . '/files'); |
|
140 | + $view = new View(\OCP\User::getUser().'/files'); |
|
141 | 141 | if ($view->file_exists($params['newpath'])) { |
142 | 142 | Storage::store($params['newpath']); |
143 | 143 | } else { |
@@ -75,10 +75,10 @@ |
||
75 | 75 | Request::USER_AGENT_ANDROID_MOBILE_CHROME, |
76 | 76 | Request::USER_AGENT_FREEBOX, |
77 | 77 | ])) { |
78 | - $response->addHeader('Content-Disposition', 'attachment; filename="' . rawurlencode($filename) . '"'); |
|
78 | + $response->addHeader('Content-Disposition', 'attachment; filename="'.rawurlencode($filename).'"'); |
|
79 | 79 | } else { |
80 | - $response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\'' . rawurlencode($filename) |
|
81 | - . '; filename="' . rawurlencode($filename) . '"'); |
|
80 | + $response->addHeader('Content-Disposition', 'attachment; filename*=UTF-8\'\''.rawurlencode($filename) |
|
81 | + . '; filename="'.rawurlencode($filename).'"'); |
|
82 | 82 | } |
83 | 83 | } |
84 | 84 | } |
@@ -29,10 +29,10 @@ |
||
29 | 29 | * |
30 | 30 | */ |
31 | 31 | |
32 | -require_once __DIR__ . '/lib/versioncheck.php'; |
|
32 | +require_once __DIR__.'/lib/versioncheck.php'; |
|
33 | 33 | |
34 | 34 | try { |
35 | - require_once __DIR__ . '/lib/base.php'; |
|
35 | + require_once __DIR__.'/lib/base.php'; |
|
36 | 36 | |
37 | 37 | OC::handleRequest(); |
38 | 38 | } catch (\OC\ServiceUnavailableException $ex) { |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | * |
32 | 32 | */ |
33 | 33 | |
34 | -require_once __DIR__ . '/lib/versioncheck.php'; |
|
34 | +require_once __DIR__.'/lib/versioncheck.php'; |
|
35 | 35 | |
36 | 36 | try { |
37 | - require_once __DIR__ . '/lib/base.php'; |
|
37 | + require_once __DIR__.'/lib/base.php'; |
|
38 | 38 | if (\OCP\Util::needUpgrade()) { |
39 | 39 | // since the behavior of apps or remotes are unpredictable during |
40 | 40 | // an upgrade, return a 503 directly |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $pathInfo = trim($pathInfo, '/'); |
56 | 56 | list($service) = explode('/', $pathInfo); |
57 | 57 | } |
58 | - $file = \OC::$server->getConfig()->getAppValue('core', 'public_' . strip_tags($service)); |
|
58 | + $file = \OC::$server->getConfig()->getAppValue('core', 'public_'.strip_tags($service)); |
|
59 | 59 | if ($file === '') { |
60 | 60 | http_response_code(404); |
61 | 61 | exit; |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | OC_App::loadApp($app); |
77 | 77 | OC_User::setIncognitoMode(true); |
78 | 78 | |
79 | - $baseuri = OC::$WEBROOT . '/public.php/' . $service . '/'; |
|
79 | + $baseuri = OC::$WEBROOT.'/public.php/'.$service.'/'; |
|
80 | 80 | |
81 | - require_once OC_App::getAppPath($app) . '/' . $parts[1]; |
|
81 | + require_once OC_App::getAppPath($app).'/'.$parts[1]; |
|
82 | 82 | } catch (Exception $ex) { |
83 | 83 | $status = 500; |
84 | 84 | if ($ex instanceof \OC\ServiceUnavailableException) { |
@@ -45,15 +45,15 @@ discard block |
||
45 | 45 | * |
46 | 46 | */ |
47 | 47 | public function run($arguments) { |
48 | - $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data'); |
|
48 | + $dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data'); |
|
49 | 49 | $instanceId = $this->config->getSystemValue('instanceid', null); |
50 | 50 | |
51 | 51 | if (!is_string($instanceId) || empty($instanceId)) { |
52 | 52 | return; |
53 | 53 | } |
54 | 54 | |
55 | - $updaterFolderPath = $dataDir . '/updater-' . $instanceId; |
|
56 | - $backupFolderPath = $updaterFolderPath . '/backups'; |
|
55 | + $updaterFolderPath = $dataDir.'/updater-'.$instanceId; |
|
56 | + $backupFolderPath = $updaterFolderPath.'/backups'; |
|
57 | 57 | if (file_exists($backupFolderPath)) { |
58 | 58 | $this->log->info("$backupFolderPath exists - start to clean it up"); |
59 | 59 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ksort($dirList); |
79 | 79 | // drop the newest 3 directories |
80 | 80 | $dirList = array_slice($dirList, 0, -3); |
81 | - $this->log->info("List of all directories that will be deleted: " . json_encode($dirList)); |
|
81 | + $this->log->info("List of all directories that will be deleted: ".json_encode($dirList)); |
|
82 | 82 | |
83 | 83 | foreach ($dirList as $dir) { |
84 | 84 | $this->log->info("Removing $dir ..."); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | require_once '../../lib/base.php'; |
8 | 8 | |
9 | 9 | $urlGenerator = \OC::$server->getURLGenerator(); |
10 | - header('Location: ' . $urlGenerator->getAbsoluteURL('/')); |
|
10 | + header('Location: '.$urlGenerator->getAbsoluteURL('/')); |
|
11 | 11 | exit; |
12 | 12 | } |
13 | 13 | // @codeCoverageIgnoreEnd |
@@ -23,7 +23,7 @@ |
||
23 | 23 | <?php emit_script_loading_tags($_); ?> |
24 | 24 | <?php print_unescaped($_['headers']); ?> |
25 | 25 | </head> |
26 | - <body id="<?php p($_['bodyid']);?>"> |
|
26 | + <body id="<?php p($_['bodyid']); ?>"> |
|
27 | 27 | <?php include 'layout.noscript.warning.php'; ?> |
28 | 28 | <?php foreach ($_['initialStates'] as $app => $initialState) { ?> |
29 | 29 | <input type="hidden" id="initial-state-<?php p($app); ?>" value="<?php p(base64_encode($initialState)); ?>"> |