@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | $this->mkdir($path2); |
225 | 225 | while ($file = readdir($dir)) { |
226 | 226 | if (!Filesystem::isIgnoredDir($file)) { |
227 | - if (!$this->copy($path1 . '/' . $file, $path2 . '/' . $file)) { |
|
227 | + if (!$this->copy($path1.'/'.$file, $path2.'/'.$file)) { |
|
228 | 228 | return false; |
229 | 229 | } |
230 | 230 | } |
@@ -278,12 +278,12 @@ discard block |
||
278 | 278 | if (is_resource($dh)) { |
279 | 279 | while (($file = readdir($dh)) !== false) { |
280 | 280 | if (!\OC\Files\Filesystem::isIgnoredDir($file)) { |
281 | - if ($this->is_dir($path . '/' . $file)) { |
|
282 | - mkdir($target . '/' . $file); |
|
283 | - $this->addLocalFolder($path . '/' . $file, $target . '/' . $file); |
|
281 | + if ($this->is_dir($path.'/'.$file)) { |
|
282 | + mkdir($target.'/'.$file); |
|
283 | + $this->addLocalFolder($path.'/'.$file, $target.'/'.$file); |
|
284 | 284 | } else { |
285 | - $tmp = $this->toTmpFile($path . '/' . $file); |
|
286 | - rename($tmp, $target . '/' . $file); |
|
285 | + $tmp = $this->toTmpFile($path.'/'.$file); |
|
286 | + rename($tmp, $target.'/'.$file); |
|
287 | 287 | } |
288 | 288 | } |
289 | 289 | } |
@@ -304,10 +304,10 @@ discard block |
||
304 | 304 | continue; |
305 | 305 | } |
306 | 306 | if (strstr(strtolower($item), strtolower($query)) !== false) { |
307 | - $files[] = $dir . '/' . $item; |
|
307 | + $files[] = $dir.'/'.$item; |
|
308 | 308 | } |
309 | - if ($this->is_dir($dir . '/' . $item)) { |
|
310 | - $files = array_merge($files, $this->searchInDir($query, $dir . '/' . $item)); |
|
309 | + if ($this->is_dir($dir.'/'.$item)) { |
|
310 | + $files = array_merge($files, $this->searchInDir($query, $dir.'/'.$item)); |
|
311 | 311 | } |
312 | 312 | } |
313 | 313 | } |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | if (!isset($this->watcher)) { |
359 | 359 | $this->watcher = new Watcher($storage); |
360 | 360 | $globalPolicy = \OC::$server->getConfig()->getSystemValue('filesystem_check_changes', Watcher::CHECK_NEVER); |
361 | - $this->watcher->setPolicy((int)$this->getMountOption('filesystem_check_changes', $globalPolicy)); |
|
361 | + $this->watcher->setPolicy((int) $this->getMountOption('filesystem_check_changes', $globalPolicy)); |
|
362 | 362 | } |
363 | 363 | return $this->watcher; |
364 | 364 | } |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | if (!isset($storage->propagator)) { |
377 | 377 | $config = \OC::$server->getSystemConfig(); |
378 | - $storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_' . $config->getValue('instanceid')]); |
|
378 | + $storage->propagator = new Propagator($storage, \OC::$server->getDatabaseConnection(), ['appdata_'.$config->getValue('instanceid')]); |
|
379 | 379 | } |
380 | 380 | return $storage->propagator; |
381 | 381 | } |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | */ |
434 | 434 | public function cleanPath($path) { |
435 | 435 | if (strlen($path) == 0 or $path[0] != '/') { |
436 | - $path = '/' . $path; |
|
436 | + $path = '/'.$path; |
|
437 | 437 | } |
438 | 438 | |
439 | 439 | $output = []; |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | \OC::$server->getLogger()->info("External storage not available: stat() failed"); |
462 | 462 | return false; |
463 | 463 | } catch (\Exception $e) { |
464 | - \OC::$server->getLogger()->info("External storage not available: " . $e->getMessage()); |
|
464 | + \OC::$server->getLogger()->info("External storage not available: ".$e->getMessage()); |
|
465 | 465 | \OC::$server->getLogger()->logException($e, ['level' => ILogger::DEBUG]); |
466 | 466 | return false; |
467 | 467 | } |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | if (is_resource($dh)) { |
615 | 615 | while ($result and ($file = readdir($dh)) !== false) { |
616 | 616 | if (!Filesystem::isIgnoredDir($file)) { |
617 | - $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath . '/' . $file, $targetInternalPath . '/' . $file); |
|
617 | + $result &= $this->copyFromStorage($sourceStorage, $sourceInternalPath.'/'.$file, $targetInternalPath.'/'.$file); |
|
618 | 618 | } |
619 | 619 | } |
620 | 620 | } |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | $this->getCache()->remove($targetInternalPath); |
641 | 641 | } |
642 | 642 | } |
643 | - return (bool)$result; |
|
643 | + return (bool) $result; |
|
644 | 644 | } |
645 | 645 | |
646 | 646 | /** |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | ); |
748 | 748 | } |
749 | 749 | try { |
750 | - $provider->acquireLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type); |
|
750 | + $provider->acquireLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type); |
|
751 | 751 | } catch (LockedException $e) { |
752 | 752 | if ($logger) { |
753 | 753 | $logger->logException($e, ['level' => ILogger::INFO]); |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | ); |
780 | 780 | } |
781 | 781 | try { |
782 | - $provider->releaseLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type); |
|
782 | + $provider->releaseLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type); |
|
783 | 783 | } catch (LockedException $e) { |
784 | 784 | if ($logger) { |
785 | 785 | $logger->logException($e, ['level' => ILogger::INFO]); |
@@ -811,7 +811,7 @@ discard block |
||
811 | 811 | ); |
812 | 812 | } |
813 | 813 | try { |
814 | - $provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type); |
|
814 | + $provider->changeLock('files/'.md5($this->getId().'::'.trim($path, '/')), $type); |
|
815 | 815 | } catch (LockedException $e) { |
816 | 816 | \OC::$server->getLogger()->logException($e, ['level' => ILogger::INFO]); |
817 | 817 | throw $e; |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | $basePath = rtrim($directory, '/'); |
876 | 876 | while (($file = readdir($dh)) !== false) { |
877 | 877 | if (!Filesystem::isIgnoredDir($file) && !Filesystem::isFileBlacklisted($file)) { |
878 | - $childPath = $basePath . '/' . trim($file, '/'); |
|
878 | + $childPath = $basePath.'/'.trim($file, '/'); |
|
879 | 879 | yield $this->getMetaData($childPath); |
880 | 880 | } |
881 | 881 | } |