@@ -274,7 +274,7 @@ |
||
274 | 274 | } |
275 | 275 | |
276 | 276 | // check if key storage is mounted correctly |
277 | - if ($this->rootView->file_exists($rootDir . '/' . Storage::KEY_STORAGE_MARKER)) { |
|
277 | + if ($this->rootView->file_exists($rootDir.'/'.Storage::KEY_STORAGE_MARKER)) { |
|
278 | 278 | return true; |
279 | 279 | } |
280 | 280 |
@@ -117,8 +117,8 @@ |
||
117 | 117 | if ($aChunk !== $bChunk) { |
118 | 118 | // test first character (character comparison, not number comparison) |
119 | 119 | if ($aChunk[0] >= '0' && $aChunk[0] <= '9' && $bChunk[0] >= '0' && $bChunk[0] <= '9') { |
120 | - $aNum = (int)$aChunk; |
|
121 | - $bNum = (int)$bChunk; |
|
120 | + $aNum = (int) $aChunk; |
|
121 | + $bNum = (int) $bChunk; |
|
122 | 122 | return $aNum - $bNum; |
123 | 123 | } |
124 | 124 | return self::getCollator()->compare($aChunk, $bChunk); |
@@ -51,10 +51,10 @@ discard block |
||
51 | 51 | $rootView = new View(); |
52 | 52 | $user = \OC::$server->getUserSession()->getUser(); |
53 | 53 | Filesystem::initMountPoints($user->getUID()); |
54 | - if (!$rootView->file_exists('/' . $user->getUID() . '/cache')) { |
|
55 | - $rootView->mkdir('/' . $user->getUID() . '/cache'); |
|
54 | + if (!$rootView->file_exists('/'.$user->getUID().'/cache')) { |
|
55 | + $rootView->mkdir('/'.$user->getUID().'/cache'); |
|
56 | 56 | } |
57 | - $this->storage = new View('/' . $user->getUID() . '/cache'); |
|
57 | + $this->storage = new View('/'.$user->getUID().'/cache'); |
|
58 | 58 | return $this->storage; |
59 | 59 | } else { |
60 | 60 | \OCP\Util::writeLog('core', 'Can\'t get cache storage, user not logged in', \OCP\Util::ERROR); |
@@ -104,12 +104,12 @@ discard block |
||
104 | 104 | // unique id to avoid chunk collision, just in case |
105 | 105 | $uniqueId = \OC::$server->getSecureRandom()->generate( |
106 | 106 | 16, |
107 | - ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER |
|
107 | + ISecureRandom::CHAR_DIGITS.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER |
|
108 | 108 | ); |
109 | 109 | |
110 | 110 | // use part file to prevent hasKey() to find the key |
111 | 111 | // while it is being written |
112 | - $keyPart = $key . '.' . $uniqueId . '.part'; |
|
112 | + $keyPart = $key.'.'.$uniqueId.'.part'; |
|
113 | 113 | if ($storage and $storage->file_put_contents($keyPart, $value)) { |
114 | 114 | if ($ttl === 0) { |
115 | 115 | $ttl = 86400; // 60*60*24 |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | if (is_resource($dh)) { |
159 | 159 | while (($file = readdir($dh)) !== false) { |
160 | 160 | if ($file != '.' and $file != '..' and ($prefix === '' || strpos($file, $prefix) === 0)) { |
161 | - $storage->unlink('/' . $file); |
|
161 | + $storage->unlink('/'.$file); |
|
162 | 162 | } |
163 | 163 | } |
164 | 164 | } |
@@ -183,17 +183,17 @@ discard block |
||
183 | 183 | while (($file = readdir($dh)) !== false) { |
184 | 184 | if ($file != '.' and $file != '..') { |
185 | 185 | try { |
186 | - $mtime = $storage->filemtime('/' . $file); |
|
186 | + $mtime = $storage->filemtime('/'.$file); |
|
187 | 187 | if ($mtime < $now) { |
188 | - $storage->unlink('/' . $file); |
|
188 | + $storage->unlink('/'.$file); |
|
189 | 189 | } |
190 | 190 | } catch (\OCP\Lock\LockedException $e) { |
191 | 191 | // ignore locked chunks |
192 | - \OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', array('app' => 'core')); |
|
192 | + \OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', array('app' => 'core')); |
|
193 | 193 | } catch (\OCP\Files\ForbiddenException $e) { |
194 | - \OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "' . $file . '"', array('app' => 'core')); |
|
194 | + \OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "'.$file.'"', array('app' => 'core')); |
|
195 | 195 | } catch (\OCP\Files\LockNotAcquiredException $e) { |
196 | - \OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', array('app' => 'core')); |
|
196 | + \OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', array('app' => 'core')); |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | } |
@@ -222,8 +222,8 @@ |
||
222 | 222 | public function count($search = '') { |
223 | 223 | $users = false; |
224 | 224 | foreach ($this->backends as $backend) { |
225 | - if($backend->implementsActions(\OC\Group\Backend::COUNT_USERS)) { |
|
226 | - if($users === false) { |
|
225 | + if ($backend->implementsActions(\OC\Group\Backend::COUNT_USERS)) { |
|
226 | + if ($users === false) { |
|
227 | 227 | //we could directly add to a bool variable, but this would |
228 | 228 | //be ugly |
229 | 229 | $users = 0; |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | IUserSession $userSession |
61 | 61 | ) { |
62 | 62 | $this->user = $user; |
63 | - $this->isAdmin = (bool)$isAdmin; |
|
63 | + $this->isAdmin = (bool) $isAdmin; |
|
64 | 64 | $this->groupManager = $groupManager; |
65 | 65 | $this->userSession = $userSession; |
66 | 66 | } |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | * @return array |
77 | 77 | */ |
78 | 78 | public function get($groupSearch = '', $userSearch = '') { |
79 | - $key = $groupSearch . '::' . $userSearch; |
|
80 | - if(isset($this->metaData[$key])) { |
|
79 | + $key = $groupSearch.'::'.$userSearch; |
|
80 | + if (isset($this->metaData[$key])) { |
|
81 | 81 | return $this->metaData[$key]; |
82 | 82 | } |
83 | 83 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $sortAdminGroupsIndex = 0; |
89 | 89 | $sortAdminGroupsKeys = array(); |
90 | 90 | |
91 | - foreach($this->getGroups($groupSearch) as $group) { |
|
91 | + foreach ($this->getGroups($groupSearch) as $group) { |
|
92 | 92 | $groupMetaData = $this->generateGroupMetaData($group, $userSearch); |
93 | 93 | if (strtolower($group->getGID()) !== 'admin') { |
94 | 94 | $this->addEntry( |
@@ -185,11 +185,11 @@ discard block |
||
185 | 185 | * @return \OCP\IGroup[] |
186 | 186 | */ |
187 | 187 | protected function getGroups($search = '') { |
188 | - if($this->isAdmin) { |
|
188 | + if ($this->isAdmin) { |
|
189 | 189 | return $this->groupManager->search($search); |
190 | 190 | } else { |
191 | 191 | $userObject = $this->userSession->getUser(); |
192 | - if($userObject !== null) { |
|
192 | + if ($userObject !== null) { |
|
193 | 193 | $groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($userObject); |
194 | 194 | } else { |
195 | 195 | $groups = []; |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function getSupportedActions() { |
51 | 51 | $actions = 0; |
52 | - foreach($this->possibleActions AS $action => $methodName) { |
|
53 | - if(method_exists($this, $methodName)) { |
|
52 | + foreach ($this->possibleActions AS $action => $methodName) { |
|
53 | + if (method_exists($this, $methodName)) { |
|
54 | 54 | $actions |= $action; |
55 | 55 | } |
56 | 56 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | * compared with \OC\Group\Backend::CREATE_GROUP etc. |
68 | 68 | */ |
69 | 69 | public function implementsActions($actions) { |
70 | - return (bool)($this->getSupportedActions() & $actions); |
|
70 | + return (bool) ($this->getSupportedActions() & $actions); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -20,4 +20,4 @@ |
||
20 | 20 | * |
21 | 21 | */ |
22 | 22 | |
23 | -require_once __DIR__ . '/v1.php'; |
|
23 | +require_once __DIR__.'/v1.php'; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | * |
20 | 20 | */ |
21 | 21 | |
22 | -require_once __DIR__ . '/../lib/base.php'; |
|
22 | +require_once __DIR__.'/../lib/base.php'; |
|
23 | 23 | |
24 | 24 | header('Content-Type: application/json'); |
25 | 25 |
@@ -49,7 +49,7 @@ |
||
49 | 49 | <p id="update-progress-message-error" class="hidden"></p> |
50 | 50 | <ul id="update-progress-message-warnings" class="hidden"></ul> |
51 | 51 | <p id="update-progress-message"></p> |
52 | - <a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a> |
|
52 | + <a class="update-show-detailed"><?php p($l->t('Detailed logs')); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a> |
|
53 | 53 | <div id="update-progress-detailed" class="hidden"></div> |
54 | 54 | </div> |
55 | 55 | </div> |