@@ -130,21 +130,21 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | protected function attachListener($mount) { |
| 132 | 132 | $scanner = $mount->getStorage()->getScanner(); |
| 133 | - $scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function ($path) use ($mount) { |
|
| 134 | - $this->emit('\OC\Files\Utils\Scanner', 'scanFile', [$mount->getMountPoint() . $path]); |
|
| 135 | - $this->dispatcher->dispatchTyped(new BeforeFileScannedEvent($mount->getMountPoint() . $path)); |
|
| 133 | + $scanner->listen('\OC\Files\Cache\Scanner', 'scanFile', function($path) use ($mount) { |
|
| 134 | + $this->emit('\OC\Files\Utils\Scanner', 'scanFile', [$mount->getMountPoint().$path]); |
|
| 135 | + $this->dispatcher->dispatchTyped(new BeforeFileScannedEvent($mount->getMountPoint().$path)); |
|
| 136 | 136 | }); |
| 137 | - $scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function ($path) use ($mount) { |
|
| 138 | - $this->emit('\OC\Files\Utils\Scanner', 'scanFolder', [$mount->getMountPoint() . $path]); |
|
| 139 | - $this->dispatcher->dispatchTyped(new BeforeFolderScannedEvent($mount->getMountPoint() . $path)); |
|
| 137 | + $scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function($path) use ($mount) { |
|
| 138 | + $this->emit('\OC\Files\Utils\Scanner', 'scanFolder', [$mount->getMountPoint().$path]); |
|
| 139 | + $this->dispatcher->dispatchTyped(new BeforeFolderScannedEvent($mount->getMountPoint().$path)); |
|
| 140 | 140 | }); |
| 141 | - $scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function ($path) use ($mount) { |
|
| 142 | - $this->emit('\OC\Files\Utils\Scanner', 'postScanFile', [$mount->getMountPoint() . $path]); |
|
| 143 | - $this->dispatcher->dispatchTyped(new FileScannedEvent($mount->getMountPoint() . $path)); |
|
| 141 | + $scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function($path) use ($mount) { |
|
| 142 | + $this->emit('\OC\Files\Utils\Scanner', 'postScanFile', [$mount->getMountPoint().$path]); |
|
| 143 | + $this->dispatcher->dispatchTyped(new FileScannedEvent($mount->getMountPoint().$path)); |
|
| 144 | 144 | }); |
| 145 | - $scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function ($path) use ($mount) { |
|
| 146 | - $this->emit('\OC\Files\Utils\Scanner', 'postScanFolder', [$mount->getMountPoint() . $path]); |
|
| 147 | - $this->dispatcher->dispatchTyped(new FolderScannedEvent($mount->getMountPoint() . $path)); |
|
| 145 | + $scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function($path) use ($mount) { |
|
| 146 | + $this->emit('\OC\Files\Utils\Scanner', 'postScanFolder', [$mount->getMountPoint().$path]); |
|
| 147 | + $this->dispatcher->dispatchTyped(new FolderScannedEvent($mount->getMountPoint().$path)); |
|
| 148 | 148 | }); |
| 149 | 149 | } |
| 150 | 150 | |
@@ -171,13 +171,13 @@ discard block |
||
| 171 | 171 | $scanner = $storage->getScanner(); |
| 172 | 172 | $this->attachListener($mount); |
| 173 | 173 | |
| 174 | - $scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) { |
|
| 174 | + $scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function($path) use ($storage) { |
|
| 175 | 175 | $this->triggerPropagator($storage, $path); |
| 176 | 176 | }); |
| 177 | - $scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) { |
|
| 177 | + $scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function($path) use ($storage) { |
|
| 178 | 178 | $this->triggerPropagator($storage, $path); |
| 179 | 179 | }); |
| 180 | - $scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) { |
|
| 180 | + $scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function($path) use ($storage) { |
|
| 181 | 181 | $this->triggerPropagator($storage, $path); |
| 182 | 182 | }); |
| 183 | 183 | |
@@ -235,15 +235,15 @@ discard block |
||
| 235 | 235 | $scanner->setUseTransactions(false); |
| 236 | 236 | $this->attachListener($mount); |
| 237 | 237 | |
| 238 | - $scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) { |
|
| 238 | + $scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function($path) use ($storage) { |
|
| 239 | 239 | $this->postProcessEntry($storage, $path); |
| 240 | 240 | $this->dispatcher->dispatchTyped(new NodeRemovedFromCache($storage, $path)); |
| 241 | 241 | }); |
| 242 | - $scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) { |
|
| 242 | + $scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function($path) use ($storage) { |
|
| 243 | 243 | $this->postProcessEntry($storage, $path); |
| 244 | 244 | $this->dispatcher->dispatchTyped(new FileCacheUpdated($storage, $path)); |
| 245 | 245 | }); |
| 246 | - $scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) { |
|
| 246 | + $scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function($path) use ($storage) { |
|
| 247 | 247 | $this->postProcessEntry($storage, $path); |
| 248 | 248 | $this->dispatcher->dispatchTyped(new NodeAddedToCache($storage, $path)); |
| 249 | 249 | }); |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | } |
| 267 | 267 | $propagator->commitBatch(); |
| 268 | 268 | } catch (StorageNotAvailableException $e) { |
| 269 | - $this->logger->error('Storage ' . $storage->getId() . ' not available'); |
|
| 269 | + $this->logger->error('Storage '.$storage->getId().' not available'); |
|
| 270 | 270 | $this->logger->logException($e); |
| 271 | 271 | $this->emit('\OC\Files\Utils\Scanner', 'StorageNotAvailable', [$e]); |
| 272 | 272 | } |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | $rootView = new View(); |
| 56 | 56 | $user = \OC::$server->getUserSession()->getUser(); |
| 57 | 57 | Filesystem::initMountPoints($user->getUID()); |
| 58 | - if (!$rootView->file_exists('/' . $user->getUID() . '/cache')) { |
|
| 59 | - $rootView->mkdir('/' . $user->getUID() . '/cache'); |
|
| 58 | + if (!$rootView->file_exists('/'.$user->getUID().'/cache')) { |
|
| 59 | + $rootView->mkdir('/'.$user->getUID().'/cache'); |
|
| 60 | 60 | } |
| 61 | - $this->storage = new View('/' . $user->getUID() . '/cache'); |
|
| 61 | + $this->storage = new View('/'.$user->getUID().'/cache'); |
|
| 62 | 62 | return $this->storage; |
| 63 | 63 | } else { |
| 64 | 64 | \OCP\Util::writeLog('core', 'Can\'t get cache storage, user not logged in', ILogger::ERROR); |
@@ -108,12 +108,12 @@ discard block |
||
| 108 | 108 | // unique id to avoid chunk collision, just in case |
| 109 | 109 | $uniqueId = \OC::$server->getSecureRandom()->generate( |
| 110 | 110 | 16, |
| 111 | - ISecureRandom::CHAR_DIGITS . ISecureRandom::CHAR_LOWER . ISecureRandom::CHAR_UPPER |
|
| 111 | + ISecureRandom::CHAR_DIGITS.ISecureRandom::CHAR_LOWER.ISecureRandom::CHAR_UPPER |
|
| 112 | 112 | ); |
| 113 | 113 | |
| 114 | 114 | // use part file to prevent hasKey() to find the key |
| 115 | 115 | // while it is being written |
| 116 | - $keyPart = $key . '.' . $uniqueId . '.part'; |
|
| 116 | + $keyPart = $key.'.'.$uniqueId.'.part'; |
|
| 117 | 117 | if ($storage and $storage->file_put_contents($keyPart, $value)) { |
| 118 | 118 | if ($ttl === 0) { |
| 119 | 119 | $ttl = 86400; // 60*60*24 |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | if (is_resource($dh)) { |
| 163 | 163 | while (($file = readdir($dh)) !== false) { |
| 164 | 164 | if ($file != '.' and $file != '..' and ($prefix === '' || strpos($file, $prefix) === 0)) { |
| 165 | - $storage->unlink('/' . $file); |
|
| 165 | + $storage->unlink('/'.$file); |
|
| 166 | 166 | } |
| 167 | 167 | } |
| 168 | 168 | } |
@@ -187,17 +187,17 @@ discard block |
||
| 187 | 187 | while (($file = readdir($dh)) !== false) { |
| 188 | 188 | if ($file != '.' and $file != '..') { |
| 189 | 189 | try { |
| 190 | - $mtime = $storage->filemtime('/' . $file); |
|
| 190 | + $mtime = $storage->filemtime('/'.$file); |
|
| 191 | 191 | if ($mtime < $now) { |
| 192 | - $storage->unlink('/' . $file); |
|
| 192 | + $storage->unlink('/'.$file); |
|
| 193 | 193 | } |
| 194 | 194 | } catch (\OCP\Lock\LockedException $e) { |
| 195 | 195 | // ignore locked chunks |
| 196 | - \OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']); |
|
| 196 | + \OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', ['app' => 'core']); |
|
| 197 | 197 | } catch (\OCP\Files\ForbiddenException $e) { |
| 198 | - \OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "' . $file . '"', ['app' => 'core']); |
|
| 198 | + \OC::$server->getLogger()->debug('Could not cleanup forbidden chunk "'.$file.'"', ['app' => 'core']); |
|
| 199 | 199 | } catch (\OCP\Files\LockNotAcquiredException $e) { |
| 200 | - \OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', ['app' => 'core']); |
|
| 200 | + \OC::$server->getLogger()->debug('Could not cleanup locked chunk "'.$file.'"', ['app' => 'core']); |
|
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public function generate($name, $parameters = [], $absolute = false) { |
| 53 | 53 | asort($parameters); |
| 54 | - $key = $this->context->getHost() . '#' . $this->context->getBaseUrl() . $name . sha1(json_encode($parameters)) . (int)$absolute; |
|
| 54 | + $key = $this->context->getHost().'#'.$this->context->getBaseUrl().$name.sha1(json_encode($parameters)).(int) $absolute; |
|
| 55 | 55 | $cachedKey = $this->cache->get($key); |
| 56 | 56 | if ($cachedKey) { |
| 57 | 57 | return $cachedKey; |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $tables = $this->getAllNonUTF8BinTables($this->connection); |
| 79 | 79 | foreach ($tables as $table) { |
| 80 | 80 | $output->info("Change row format for $table ..."); |
| 81 | - $query = $this->connection->prepare('ALTER TABLE `' . $table . '` ROW_FORMAT = DYNAMIC;'); |
|
| 81 | + $query = $this->connection->prepare('ALTER TABLE `'.$table.'` ROW_FORMAT = DYNAMIC;'); |
|
| 82 | 82 | try { |
| 83 | 83 | $query->execute(); |
| 84 | 84 | } catch (DriverException $e) { |
@@ -92,10 +92,10 @@ discard block |
||
| 92 | 92 | $output->info("Change collation for $table ..."); |
| 93 | 93 | if ($characterSet === 'utf8mb4') { |
| 94 | 94 | // need to set row compression first |
| 95 | - $query = $this->connection->prepare('ALTER TABLE `' . $table . '` ROW_FORMAT=COMPRESSED;'); |
|
| 95 | + $query = $this->connection->prepare('ALTER TABLE `'.$table.'` ROW_FORMAT=COMPRESSED;'); |
|
| 96 | 96 | $query->execute(); |
| 97 | 97 | } |
| 98 | - $query = $this->connection->prepare('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET ' . $characterSet . ' COLLATE ' . $characterSet . '_bin;'); |
|
| 98 | + $query = $this->connection->prepare('ALTER TABLE `'.$table.'` CONVERT TO CHARACTER SET '.$characterSet.' COLLATE '.$characterSet.'_bin;'); |
|
| 99 | 99 | try { |
| 100 | 100 | $query->execute(); |
| 101 | 101 | } catch (DriverException $e) { |
@@ -121,10 +121,10 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | // fetch tables by columns |
| 123 | 123 | $statement = $connection->executeQuery( |
| 124 | - "SELECT DISTINCT(TABLE_NAME) AS `table`" . |
|
| 125 | - " FROM INFORMATION_SCHEMA . COLUMNS" . |
|
| 126 | - " WHERE TABLE_SCHEMA = ?" . |
|
| 127 | - " AND (COLLATION_NAME <> '" . $characterSet . "_bin' OR CHARACTER_SET_NAME <> '" . $characterSet . "')" . |
|
| 124 | + "SELECT DISTINCT(TABLE_NAME) AS `table`". |
|
| 125 | + " FROM INFORMATION_SCHEMA . COLUMNS". |
|
| 126 | + " WHERE TABLE_SCHEMA = ?". |
|
| 127 | + " AND (COLLATION_NAME <> '".$characterSet."_bin' OR CHARACTER_SET_NAME <> '".$characterSet."')". |
|
| 128 | 128 | " AND TABLE_NAME LIKE '*PREFIX*%'", |
| 129 | 129 | [$dbName] |
| 130 | 130 | ); |
@@ -136,10 +136,10 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | // fetch tables by collation |
| 138 | 138 | $statement = $connection->executeQuery( |
| 139 | - "SELECT DISTINCT(TABLE_NAME) AS `table`" . |
|
| 140 | - " FROM INFORMATION_SCHEMA . TABLES" . |
|
| 141 | - " WHERE TABLE_SCHEMA = ?" . |
|
| 142 | - " AND TABLE_COLLATION <> '" . $characterSet . "_bin'" . |
|
| 139 | + "SELECT DISTINCT(TABLE_NAME) AS `table`". |
|
| 140 | + " FROM INFORMATION_SCHEMA . TABLES". |
|
| 141 | + " WHERE TABLE_SCHEMA = ?". |
|
| 142 | + " AND TABLE_COLLATION <> '".$characterSet."_bin'". |
|
| 143 | 143 | " AND TABLE_NAME LIKE '*PREFIX*%'", |
| 144 | 144 | [$dbName] |
| 145 | 145 | ); |
@@ -91,20 +91,20 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function addFolder($path) { |
| 93 | 93 | $tmpBase = \OC::$server->getTempManager()->getTemporaryFolder(); |
| 94 | - $path = rtrim($path, '/') . '/'; |
|
| 94 | + $path = rtrim($path, '/').'/'; |
|
| 95 | 95 | if ($this->fileExists($path)) { |
| 96 | 96 | return false; |
| 97 | 97 | } |
| 98 | 98 | $parts = explode('/', $path); |
| 99 | 99 | $folder = $tmpBase; |
| 100 | 100 | foreach ($parts as $part) { |
| 101 | - $folder .= '/' . $part; |
|
| 101 | + $folder .= '/'.$part; |
|
| 102 | 102 | if (!is_dir($folder)) { |
| 103 | 103 | mkdir($folder); |
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | - $result = $this->tar->addModify([$tmpBase . $path], '', $tmpBase); |
|
| 107 | - rmdir($tmpBase . $path); |
|
| 106 | + $result = $this->tar->addModify([$tmpBase.$path], '', $tmpBase); |
|
| 107 | + rmdir($tmpBase.$path); |
|
| 108 | 108 | $this->fileList = false; |
| 109 | 109 | $this->cachedHeaders = false; |
| 110 | 110 | return $result; |
@@ -141,12 +141,12 @@ discard block |
||
| 141 | 141 | //no proper way to delete, rename entire archive, rename file and remake archive |
| 142 | 142 | $tmp = \OC::$server->getTempManager()->getTemporaryFolder(); |
| 143 | 143 | $this->tar->extract($tmp); |
| 144 | - rename($tmp . $source, $tmp . $dest); |
|
| 144 | + rename($tmp.$source, $tmp.$dest); |
|
| 145 | 145 | $this->tar = null; |
| 146 | 146 | unlink($this->path); |
| 147 | 147 | $types = [null, 'gz', 'bz']; |
| 148 | 148 | $this->tar = new \Archive_Tar($this->path, $types[self::getTarType($this->path)]); |
| 149 | - $this->tar->createModify([$tmp], '', $tmp . '/'); |
|
| 149 | + $this->tar->createModify([$tmp], '', $tmp.'/'); |
|
| 150 | 150 | $this->fileList = false; |
| 151 | 151 | $this->cachedHeaders = false; |
| 152 | 152 | return true; |
@@ -161,9 +161,9 @@ discard block |
||
| 161 | 161 | } |
| 162 | 162 | foreach ($this->cachedHeaders as $header) { |
| 163 | 163 | if ($file == $header['filename'] |
| 164 | - or $file . '/' == $header['filename'] |
|
| 165 | - or '/' . $file . '/' == $header['filename'] |
|
| 166 | - or '/' . $file == $header['filename'] |
|
| 164 | + or $file.'/' == $header['filename'] |
|
| 165 | + or '/'.$file.'/' == $header['filename'] |
|
| 166 | + or '/'.$file == $header['filename'] |
|
| 167 | 167 | ) { |
| 168 | 168 | return $header; |
| 169 | 169 | } |
@@ -262,13 +262,13 @@ discard block |
||
| 262 | 262 | if (!$this->fileExists($path)) { |
| 263 | 263 | return false; |
| 264 | 264 | } |
| 265 | - if ($this->fileExists('/' . $path)) { |
|
| 266 | - $success = $this->tar->extractList(['/' . $path], $tmp); |
|
| 265 | + if ($this->fileExists('/'.$path)) { |
|
| 266 | + $success = $this->tar->extractList(['/'.$path], $tmp); |
|
| 267 | 267 | } else { |
| 268 | 268 | $success = $this->tar->extractList([$path], $tmp); |
| 269 | 269 | } |
| 270 | 270 | if ($success) { |
| 271 | - rename($tmp . $path, $dest); |
|
| 271 | + rename($tmp.$path, $dest); |
|
| 272 | 272 | } |
| 273 | 273 | \OCP\Files::rmdirr($tmp); |
| 274 | 274 | return $success; |
@@ -292,10 +292,10 @@ discard block |
||
| 292 | 292 | */ |
| 293 | 293 | public function fileExists($path) { |
| 294 | 294 | $files = $this->getFiles(); |
| 295 | - if ((array_search($path, $files) !== false) or (array_search($path . '/', $files) !== false)) { |
|
| 295 | + if ((array_search($path, $files) !== false) or (array_search($path.'/', $files) !== false)) { |
|
| 296 | 296 | return true; |
| 297 | 297 | } else { |
| 298 | - $folderPath = rtrim($path, '/') . '/'; |
|
| 298 | + $folderPath = rtrim($path, '/').'/'; |
|
| 299 | 299 | $pathLength = strlen($folderPath); |
| 300 | 300 | foreach ($files as $file) { |
| 301 | 301 | if (strlen($file) > $pathLength and substr($file, 0, $pathLength) == $folderPath) { |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | } |
| 305 | 305 | } |
| 306 | 306 | if ($path[0] != '/') { //not all programs agree on the use of a leading / |
| 307 | - return $this->fileExists('/' . $path); |
|
| 307 | + return $this->fileExists('/'.$path); |
|
| 308 | 308 | } else { |
| 309 | 309 | return false; |
| 310 | 310 | } |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | //no proper way to delete, extract entire archive, delete file and remake archive |
| 326 | 326 | $tmp = \OC::$server->getTempManager()->getTemporaryFolder(); |
| 327 | 327 | $this->tar->extract($tmp); |
| 328 | - \OCP\Files::rmdirr($tmp . $path); |
|
| 328 | + \OCP\Files::rmdirr($tmp.$path); |
|
| 329 | 329 | $this->tar = null; |
| 330 | 330 | unlink($this->path); |
| 331 | 331 | $this->reopen(); |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | return fopen($tmpFile, $mode); |
| 357 | 357 | } else { |
| 358 | 358 | $handle = fopen($tmpFile, $mode); |
| 359 | - return CallbackWrapper::wrap($handle, null, null, function () use ($path, $tmpFile) { |
|
| 359 | + return CallbackWrapper::wrap($handle, null, null, function() use ($path, $tmpFile) { |
|
| 360 | 360 | $this->writeBack($tmpFile, $path); |
| 361 | 361 | }); |
| 362 | 362 | } |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | $uid = $publicKeyCredentialUserEntity->getId(); |
| 57 | 57 | $entities = $this->credentialMapper->findAllForUid($uid); |
| 58 | 58 | |
| 59 | - return array_map(function (PublicKeyCredentialEntity $entity) { |
|
| 59 | + return array_map(function(PublicKeyCredentialEntity $entity) { |
|
| 60 | 60 | return $entity->toPublicKeyCredentialSource(); |
| 61 | 61 | }, $entities); |
| 62 | 62 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | ]); |
| 63 | 63 | |
| 64 | 64 | SeekableHttpStream::registerIfNeeded(); |
| 65 | - return fopen(SeekableHttpStream::PROTOCOL . '://', 'r', false, $context); |
|
| 65 | + return fopen(SeekableHttpStream::PROTOCOL.'://', 'r', false, $context); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** @var resource */ |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | private $offset = 0; |
| 78 | 78 | |
| 79 | 79 | private function reconnect(int $start) { |
| 80 | - $range = $start . '-'; |
|
| 80 | + $range = $start.'-'; |
|
| 81 | 81 | if ($this->current != null) { |
| 82 | 82 | fclose($this->current); |
| 83 | 83 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | $responseHead = stream_get_meta_data($this->current)['wrapper_data']; |
| 92 | - $rangeHeaders = array_values(array_filter($responseHead, function ($v) { |
|
| 92 | + $rangeHeaders = array_values(array_filter($responseHead, function($v) { |
|
| 93 | 93 | return preg_match('#^content-range:#i', $v) === 1; |
| 94 | 94 | })); |
| 95 | 95 | if (!$rangeHeaders) { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | case 'database': |
| 92 | 92 | case 'mysql': |
| 93 | 93 | case 'sqlite': |
| 94 | - \OCP\Util::writeLog('core', 'Adding user backend ' . $backend . '.', ILogger::DEBUG); |
|
| 94 | + \OCP\Util::writeLog('core', 'Adding user backend '.$backend.'.', ILogger::DEBUG); |
|
| 95 | 95 | self::$_usedBackends[$backend] = new \OC\User\Database(); |
| 96 | 96 | \OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]); |
| 97 | 97 | break; |
@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | \OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]); |
| 101 | 101 | break; |
| 102 | 102 | default: |
| 103 | - \OCP\Util::writeLog('core', 'Adding default user backend ' . $backend . '.', ILogger::DEBUG); |
|
| 104 | - $className = 'OC_USER_' . strtoupper($backend); |
|
| 103 | + \OCP\Util::writeLog('core', 'Adding default user backend '.$backend.'.', ILogger::DEBUG); |
|
| 104 | + $className = 'OC_USER_'.strtoupper($backend); |
|
| 105 | 105 | self::$_usedBackends[$backend] = new $className(); |
| 106 | 106 | \OC::$server->getUserManager()->registerBackend(self::$_usedBackends[$backend]); |
| 107 | 107 | break; |
@@ -145,10 +145,10 @@ discard block |
||
| 145 | 145 | self::useBackend($backend); |
| 146 | 146 | self::$_setupedBackends[] = $i; |
| 147 | 147 | } else { |
| 148 | - \OCP\Util::writeLog('core', 'User backend ' . $class . ' already initialized.', ILogger::DEBUG); |
|
| 148 | + \OCP\Util::writeLog('core', 'User backend '.$class.' already initialized.', ILogger::DEBUG); |
|
| 149 | 149 | } |
| 150 | 150 | } else { |
| 151 | - \OCP\Util::writeLog('core', 'User backend ' . $class . ' not found.', ILogger::ERROR); |
|
| 151 | + \OCP\Util::writeLog('core', 'User backend '.$class.' not found.', ILogger::ERROR); |
|
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | } |
@@ -270,7 +270,7 @@ discard block |
||
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | $logoutUrl = $urlGenerator->linkToRoute('core.login.logout'); |
| 273 | - $logoutUrl .= '?requesttoken=' . urlencode(\OCP\Util::callRegister()); |
|
| 273 | + $logoutUrl .= '?requesttoken='.urlencode(\OCP\Util::callRegister()); |
|
| 274 | 274 | |
| 275 | 275 | return $logoutUrl; |
| 276 | 276 | } |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | if ($user) { |
| 363 | 363 | return $user->getHome(); |
| 364 | 364 | } else { |
| 365 | - return \OC::$server->getSystemConfig()->getValue('datadirectory', OC::$SERVERROOT . '/data') . '/' . $uid; |
|
| 365 | + return \OC::$server->getSystemConfig()->getValue('datadirectory', OC::$SERVERROOT.'/data').'/'.$uid; |
|
| 366 | 366 | } |
| 367 | 367 | } |
| 368 | 368 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | 'preLoginNameUsedAsUserName', |
| 78 | 78 | ['uid' => &$uid] |
| 79 | 79 | ); |
| 80 | - $this->logger->debug('Got UID: ' . $uid); |
|
| 80 | + $this->logger->debug('Got UID: '.$uid); |
|
| 81 | 81 | |
| 82 | 82 | $publicKeyCredentialRequestOptions = $this->webAuthnManger->startAuthentication($uid, $this->request->getServerHost()); |
| 83 | 83 | $this->session->set(self::WEBAUTHN_LOGIN, json_encode($publicKeyCredentialRequestOptions)); |