@@ -58,7 +58,7 @@ |
||
58 | 58 | // always add owner to the list of users with access to the file |
59 | 59 | $userIds = array($owner); |
60 | 60 | |
61 | - if (!$this->util->isFile($owner . '/' . $ownerPath)) { |
|
61 | + if (!$this->util->isFile($owner.'/'.$ownerPath)) { |
|
62 | 62 | return array('users' => $userIds, 'public' => false); |
63 | 63 | } |
64 | 64 |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | $this->util = $util; |
67 | 67 | |
68 | 68 | $this->encryption_base_dir = '/files_encryption'; |
69 | - $this->keys_base_dir = $this->encryption_base_dir .'/keys'; |
|
70 | - $this->backup_base_dir = $this->encryption_base_dir .'/backup'; |
|
69 | + $this->keys_base_dir = $this->encryption_base_dir.'/keys'; |
|
70 | + $this->backup_base_dir = $this->encryption_base_dir.'/backup'; |
|
71 | 71 | $this->root_dir = $this->util->getKeyStorageRoot(); |
72 | 72 | } |
73 | 73 | |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | public function getFileKey($path, $keyId, $encryptionModuleId) { |
86 | 86 | $realFile = $this->util->stripPartialFileExtension($path); |
87 | 87 | $keyDir = $this->getFileKeyDir($encryptionModuleId, $realFile); |
88 | - $key = $this->getKey($keyDir . $keyId); |
|
88 | + $key = $this->getKey($keyDir.$keyId); |
|
89 | 89 | |
90 | 90 | if ($key === '' && $realFile !== $path) { |
91 | 91 | // Check if the part file has keys and use them, if no normal keys |
92 | 92 | // exist. This is required to fix copyBetweenStorage() when we |
93 | 93 | // rename a .part file over storage borders. |
94 | 94 | $keyDir = $this->getFileKeyDir($encryptionModuleId, $path); |
95 | - $key = $this->getKey($keyDir . $keyId); |
|
95 | + $key = $this->getKey($keyDir.$keyId); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | return $key; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | */ |
120 | 120 | public function setFileKey($path, $keyId, $key, $encryptionModuleId) { |
121 | 121 | $keyDir = $this->getFileKeyDir($encryptionModuleId, $path); |
122 | - return $this->setKey($keyDir . $keyId, $key); |
|
122 | + return $this->setKey($keyDir.$keyId, $key); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | /** |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | public function deleteFileKey($path, $keyId, $encryptionModuleId) { |
145 | 145 | $keyDir = $this->getFileKeyDir($encryptionModuleId, $path); |
146 | - return !$this->view->file_exists($keyDir . $keyId) || $this->view->unlink($keyDir . $keyId); |
|
146 | + return !$this->view->file_exists($keyDir.$keyId) || $this->view->unlink($keyDir.$keyId); |
|
147 | 147 | } |
148 | 148 | |
149 | 149 | /** |
@@ -173,10 +173,10 @@ discard block |
||
173 | 173 | protected function constructUserKeyPath($encryptionModuleId, $keyId, $uid) { |
174 | 174 | |
175 | 175 | if ($uid === null) { |
176 | - $path = $this->root_dir . '/' . $this->encryption_base_dir . '/' . $encryptionModuleId . '/' . $keyId; |
|
176 | + $path = $this->root_dir.'/'.$this->encryption_base_dir.'/'.$encryptionModuleId.'/'.$keyId; |
|
177 | 177 | } else { |
178 | - $path = $this->root_dir . '/' . $uid . $this->encryption_base_dir . '/' |
|
179 | - . $encryptionModuleId . '/' . $uid . '.' . $keyId; |
|
178 | + $path = $this->root_dir.'/'.$uid.$this->encryption_base_dir.'/' |
|
179 | + . $encryptionModuleId.'/'.$uid.'.'.$keyId; |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | return \OC\Files\Filesystem::normalizePath($path); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | |
195 | 195 | if ($this->view->file_exists($path)) { |
196 | 196 | if (isset($this->keyCache[$path])) { |
197 | - $key = $this->keyCache[$path]; |
|
197 | + $key = $this->keyCache[$path]; |
|
198 | 198 | } else { |
199 | 199 | $key = $this->view->file_get_contents($path); |
200 | 200 | $this->keyCache[$path] = $key; |
@@ -238,12 +238,12 @@ discard block |
||
238 | 238 | |
239 | 239 | // in case of system wide mount points the keys are stored directly in the data directory |
240 | 240 | if ($this->util->isSystemWideMountPoint($filename, $owner)) { |
241 | - $keyPath = $this->root_dir . '/' . $this->keys_base_dir . $filename . '/'; |
|
241 | + $keyPath = $this->root_dir.'/'.$this->keys_base_dir.$filename.'/'; |
|
242 | 242 | } else { |
243 | - $keyPath = $this->root_dir . '/' . $owner . $this->keys_base_dir . $filename . '/'; |
|
243 | + $keyPath = $this->root_dir.'/'.$owner.$this->keys_base_dir.$filename.'/'; |
|
244 | 244 | } |
245 | 245 | |
246 | - return Filesystem::normalizePath($keyPath . $encryptionModuleId . '/', false); |
|
246 | + return Filesystem::normalizePath($keyPath.$encryptionModuleId.'/', false); |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | /** |
@@ -300,13 +300,13 @@ discard block |
||
300 | 300 | * @since 12.0.0 |
301 | 301 | */ |
302 | 302 | public function backupUserKeys($encryptionModuleId, $purpose, $uid) { |
303 | - $source = $uid . $this->encryption_base_dir . '/' . $encryptionModuleId; |
|
304 | - $backupDir = $uid . $this->backup_base_dir; |
|
303 | + $source = $uid.$this->encryption_base_dir.'/'.$encryptionModuleId; |
|
304 | + $backupDir = $uid.$this->backup_base_dir; |
|
305 | 305 | if (!$this->view->file_exists($backupDir)) { |
306 | 306 | $this->view->mkdir($backupDir); |
307 | 307 | } |
308 | 308 | |
309 | - $backupDir = $backupDir . '/' . $purpose . '.' . $encryptionModuleId . '.' . $this->getTimestamp(); |
|
309 | + $backupDir = $backupDir.'/'.$purpose.'.'.$encryptionModuleId.'.'.$this->getTimestamp(); |
|
310 | 310 | $this->view->mkdir($backupDir); |
311 | 311 | |
312 | 312 | return $this->view->copy($source, $backupDir); |
@@ -332,9 +332,9 @@ discard block |
||
332 | 332 | $systemWideMountPoint = $this->util->isSystemWideMountPoint($relativePath, $owner); |
333 | 333 | |
334 | 334 | if ($systemWideMountPoint) { |
335 | - $systemPath = $this->root_dir . '/' . $this->keys_base_dir . $relativePath . '/'; |
|
335 | + $systemPath = $this->root_dir.'/'.$this->keys_base_dir.$relativePath.'/'; |
|
336 | 336 | } else { |
337 | - $systemPath = $this->root_dir . '/' . $owner . $this->keys_base_dir . $relativePath . '/'; |
|
337 | + $systemPath = $this->root_dir.'/'.$owner.$this->keys_base_dir.$relativePath.'/'; |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | return Filesystem::normalizePath($systemPath, false); |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | $sub_dirs = explode('/', ltrim($path, '/')); |
352 | 352 | $dir = ''; |
353 | 353 | foreach ($sub_dirs as $sub_dir) { |
354 | - $dir .= '/' . $sub_dir; |
|
354 | + $dir .= '/'.$sub_dir; |
|
355 | 355 | if (!$this->view->is_dir($dir)) { |
356 | 356 | $this->view->mkdir($dir); |
357 | 357 | } |
@@ -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 | } |
@@ -231,7 +231,7 @@ |
||
231 | 231 | $result->closeCursor(); |
232 | 232 | |
233 | 233 | if ($all) { |
234 | - return ((int)$row[0] === count($objIds)); |
|
234 | + return ((int) $row[0] === count($objIds)); |
|
235 | 235 | } else { |
236 | 236 | return (bool) $row; |
237 | 237 | } |
@@ -136,14 +136,14 @@ discard block |
||
136 | 136 | ->from(self::TAG_TABLE); |
137 | 137 | |
138 | 138 | if (!is_null($visibilityFilter)) { |
139 | - $query->andWhere($query->expr()->eq('visibility', $query->createNamedParameter((int)$visibilityFilter))); |
|
139 | + $query->andWhere($query->expr()->eq('visibility', $query->createNamedParameter((int) $visibilityFilter))); |
|
140 | 140 | } |
141 | 141 | |
142 | 142 | if (!empty($nameSearchPattern)) { |
143 | 143 | $query->andWhere( |
144 | 144 | $query->expr()->like( |
145 | 145 | 'name', |
146 | - $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern). '%') |
|
146 | + $query->createNamedParameter('%'.$this->connection->escapeLikeParameter($nameSearchPattern).'%') |
|
147 | 147 | ) |
148 | 148 | ); |
149 | 149 | } |
@@ -167,8 +167,8 @@ discard block |
||
167 | 167 | * {@inheritdoc} |
168 | 168 | */ |
169 | 169 | public function getTag($tagName, $userVisible, $userAssignable) { |
170 | - $userVisible = (int)$userVisible; |
|
171 | - $userAssignable = (int)$userAssignable; |
|
170 | + $userVisible = (int) $userVisible; |
|
171 | + $userAssignable = (int) $userAssignable; |
|
172 | 172 | |
173 | 173 | $result = $this->selectTagQuery |
174 | 174 | ->setParameter('name', $tagName) |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $result->closeCursor(); |
181 | 181 | if (!$row) { |
182 | 182 | throw new TagNotFoundException( |
183 | - 'Tag ("' . $tagName . '", '. $userVisible . ', ' . $userAssignable . ') does not exist' |
|
183 | + 'Tag ("'.$tagName.'", '.$userVisible.', '.$userAssignable.') does not exist' |
|
184 | 184 | ); |
185 | 185 | } |
186 | 186 | |
@@ -191,8 +191,8 @@ discard block |
||
191 | 191 | * {@inheritdoc} |
192 | 192 | */ |
193 | 193 | public function createTag($tagName, $userVisible, $userAssignable) { |
194 | - $userVisible = (int)$userVisible; |
|
195 | - $userAssignable = (int)$userAssignable; |
|
194 | + $userVisible = (int) $userVisible; |
|
195 | + $userAssignable = (int) $userAssignable; |
|
196 | 196 | |
197 | 197 | $query = $this->connection->getQueryBuilder(); |
198 | 198 | $query->insert(self::TAG_TABLE) |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $query->execute(); |
207 | 207 | } catch (UniqueConstraintViolationException $e) { |
208 | 208 | throw new TagAlreadyExistsException( |
209 | - 'Tag ("' . $tagName . '", '. $userVisible . ', ' . $userAssignable . ') already exists', |
|
209 | + 'Tag ("'.$tagName.'", '.$userVisible.', '.$userAssignable.') already exists', |
|
210 | 210 | 0, |
211 | 211 | $e |
212 | 212 | ); |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | $tagId = $query->getLastInsertId(); |
216 | 216 | |
217 | 217 | $tag = new SystemTag( |
218 | - (int)$tagId, |
|
218 | + (int) $tagId, |
|
219 | 219 | $tagName, |
220 | - (bool)$userVisible, |
|
221 | - (bool)$userAssignable |
|
220 | + (bool) $userVisible, |
|
221 | + (bool) $userAssignable |
|
222 | 222 | ); |
223 | 223 | |
224 | 224 | $this->dispatcher->dispatch(ManagerEvent::EVENT_CREATE, new ManagerEvent( |
@@ -232,8 +232,8 @@ discard block |
||
232 | 232 | * {@inheritdoc} |
233 | 233 | */ |
234 | 234 | public function updateTag($tagId, $tagName, $userVisible, $userAssignable) { |
235 | - $userVisible = (int)$userVisible; |
|
236 | - $userAssignable = (int)$userAssignable; |
|
235 | + $userVisible = (int) $userVisible; |
|
236 | + $userAssignable = (int) $userAssignable; |
|
237 | 237 | |
238 | 238 | try { |
239 | 239 | $tags = $this->getTagsByIds($tagId); |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | } |
271 | 271 | } catch (UniqueConstraintViolationException $e) { |
272 | 272 | throw new TagAlreadyExistsException( |
273 | - 'Tag ("' . $tagName . '", '. $userVisible . ', ' . $userAssignable . ') already exists', |
|
273 | + 'Tag ("'.$tagName.'", '.$userVisible.', '.$userAssignable.') already exists', |
|
274 | 274 | 0, |
275 | 275 | $e |
276 | 276 | ); |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | } |
378 | 378 | |
379 | 379 | private function createSystemTagFromRow($row) { |
380 | - return new SystemTag((int)$row['id'], $row['name'], (bool)$row['visibility'], (bool)$row['editable']); |
|
380 | + return new SystemTag((int) $row['id'], $row['name'], (bool) $row['visibility'], (bool) $row['editable']); |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
@@ -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; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * Tries to create a new group. If the group name already exists, false will |
77 | 77 | * be returned. |
78 | 78 | */ |
79 | - public function createGroup( $gid ) { |
|
79 | + public function createGroup($gid) { |
|
80 | 80 | $this->fixDI(); |
81 | 81 | |
82 | 82 | // Add group |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * |
98 | 98 | * Deletes a group and removes it from the group_user-table |
99 | 99 | */ |
100 | - public function deleteGroup( $gid ) { |
|
100 | + public function deleteGroup($gid) { |
|
101 | 101 | $this->fixDI(); |
102 | 102 | |
103 | 103 | // Delete the group |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | * |
133 | 133 | * Checks whether the user is member of a group or not. |
134 | 134 | */ |
135 | - public function inGroup( $uid, $gid ) { |
|
135 | + public function inGroup($uid, $gid) { |
|
136 | 136 | $this->fixDI(); |
137 | 137 | |
138 | 138 | // check |
@@ -157,18 +157,18 @@ discard block |
||
157 | 157 | * |
158 | 158 | * Adds a user to a group. |
159 | 159 | */ |
160 | - public function addToGroup( $uid, $gid ) { |
|
160 | + public function addToGroup($uid, $gid) { |
|
161 | 161 | $this->fixDI(); |
162 | 162 | |
163 | 163 | // No duplicate entries! |
164 | - if( !$this->inGroup( $uid, $gid )) { |
|
164 | + if (!$this->inGroup($uid, $gid)) { |
|
165 | 165 | $qb = $this->dbConn->getQueryBuilder(); |
166 | 166 | $qb->insert('group_user') |
167 | 167 | ->setValue('uid', $qb->createNamedParameter($uid)) |
168 | 168 | ->setValue('gid', $qb->createNamedParameter($gid)) |
169 | 169 | ->execute(); |
170 | 170 | return true; |
171 | - }else{ |
|
171 | + } else { |
|
172 | 172 | return false; |
173 | 173 | } |
174 | 174 | } |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * |
182 | 182 | * removes the user from a group. |
183 | 183 | */ |
184 | - public function removeFromGroup( $uid, $gid ) { |
|
184 | + public function removeFromGroup($uid, $gid) { |
|
185 | 185 | $this->fixDI(); |
186 | 186 | |
187 | 187 | $qb = $this->dbConn->getQueryBuilder(); |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | * This function fetches all groups a user belongs to. It does not check |
202 | 202 | * if the user exists at all. |
203 | 203 | */ |
204 | - public function getUserGroups( $uid ) { |
|
204 | + public function getUserGroups($uid) { |
|
205 | 205 | //guests has empty or null $uid |
206 | 206 | if ($uid === null || $uid === '') { |
207 | 207 | return []; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | ->execute(); |
218 | 218 | |
219 | 219 | $groups = []; |
220 | - while( $row = $cursor->fetch()) { |
|
220 | + while ($row = $cursor->fetch()) { |
|
221 | 221 | $groups[] = $row["gid"]; |
222 | 222 | $this->groupCache[$row['gid']] = $row['gid']; |
223 | 223 | } |
@@ -239,11 +239,11 @@ discard block |
||
239 | 239 | $parameters = []; |
240 | 240 | $searchLike = ''; |
241 | 241 | if ($search !== '') { |
242 | - $parameters[] = '%' . $search . '%'; |
|
242 | + $parameters[] = '%'.$search.'%'; |
|
243 | 243 | $searchLike = ' WHERE LOWER(`gid`) LIKE LOWER(?)'; |
244 | 244 | } |
245 | 245 | |
246 | - $stmt = \OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups`' . $searchLike . ' ORDER BY `gid` ASC', $limit, $offset); |
|
246 | + $stmt = \OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups`'.$searchLike.' ORDER BY `gid` ASC', $limit, $offset); |
|
247 | 247 | $result = $stmt->execute($parameters); |
248 | 248 | $groups = array(); |
249 | 249 | while ($row = $result->fetchRow()) { |
@@ -292,11 +292,11 @@ discard block |
||
292 | 292 | $parameters = [$gid]; |
293 | 293 | $searchLike = ''; |
294 | 294 | if ($search !== '') { |
295 | - $parameters[] = '%' . $this->dbConn->escapeLikeParameter($search) . '%'; |
|
295 | + $parameters[] = '%'.$this->dbConn->escapeLikeParameter($search).'%'; |
|
296 | 296 | $searchLike = ' AND `uid` LIKE ?'; |
297 | 297 | } |
298 | 298 | |
299 | - $stmt = \OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?' . $searchLike . ' ORDER BY `uid` ASC', |
|
299 | + $stmt = \OC_DB::prepare('SELECT `uid` FROM `*PREFIX*group_user` WHERE `gid` = ?'.$searchLike.' ORDER BY `uid` ASC', |
|
300 | 300 | $limit, |
301 | 301 | $offset); |
302 | 302 | $result = $stmt->execute($parameters); |
@@ -318,14 +318,14 @@ discard block |
||
318 | 318 | $parameters = [$gid]; |
319 | 319 | $searchLike = ''; |
320 | 320 | if ($search !== '') { |
321 | - $parameters[] = '%' . $this->dbConn->escapeLikeParameter($search) . '%'; |
|
321 | + $parameters[] = '%'.$this->dbConn->escapeLikeParameter($search).'%'; |
|
322 | 322 | $searchLike = ' AND `uid` LIKE ?'; |
323 | 323 | } |
324 | 324 | |
325 | - $stmt = \OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ?' . $searchLike); |
|
325 | + $stmt = \OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ?'.$searchLike); |
|
326 | 326 | $result = $stmt->execute($parameters); |
327 | 327 | $count = $result->fetchOne(); |
328 | - if($count !== false) { |
|
328 | + if ($count !== false) { |
|
329 | 329 | $count = intval($count); |
330 | 330 | } |
331 | 331 | return $count; |