diff options
Diffstat (limited to 'lib/private/Files/Filesystem.php')
-rw-r--r-- | lib/private/Files/Filesystem.php | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index 24d21ad6049..8fddbf71200 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -62,7 +62,6 @@ namespace OC\Files; use OC\Cache\CappedMemoryCache; use OC\Files\Config\MountProviderCollection; use OC\Files\Mount\MountPoint; -use OC\Files\Storage\StorageFactory; use OC\Lockdown\Filesystem\NullStorage; use OCP\Files\Config\IMountProvider; use OCP\Files\NotFoundException; @@ -83,7 +82,7 @@ class Filesystem { */ static private $defaultInstance; - static private $usersSetup = array(); + static private $usersSetup = []; static private $normalizedPathCache = null; @@ -300,7 +299,7 @@ class Filesystem { if (!self::$mounts) { \OC_Util::setupFS(); } - $result = array(); + $result = []; $mounts = self::$mounts->findIn($path); foreach ($mounts as $mount) { $result[] = $mount->getMountPoint(); @@ -356,9 +355,9 @@ class Filesystem { } $mount = self::$mounts->find($path); if ($mount) { - return array($mount->getStorage(), rtrim($mount->getInternalPath($path), '/')); + return [$mount->getStorage(), rtrim($mount->getInternalPath($path), '/')]; } else { - return array(null, null); + return [null, null]; } } @@ -461,7 +460,7 @@ class Filesystem { '/' . $user . '/files' )); } - \OC_Hook::emit('OC_Filesystem', 'post_initMountPoints', array('user' => $user)); + \OC_Hook::emit('OC_Filesystem', 'post_initMountPoints', ['user' => $user]); } /** @@ -478,7 +477,7 @@ class Filesystem { $userObject = $userManager->get($user); if ($userObject) { $mounts = $provider->getMountsForUser($userObject, Filesystem::getLoader()); - array_walk($mounts, array(self::$mounts, 'addMount')); + array_walk($mounts, [self::$mounts, 'addMount']); } } }); @@ -521,7 +520,7 @@ class Filesystem { */ public static function clearMounts() { if (self::$mounts) { - self::$usersSetup = array(); + self::$usersSetup = []; self::$mounts->clear(); } } @@ -619,7 +618,7 @@ class Filesystem { static public function isFileBlacklisted($filename) { $filename = self::normalizePath($filename); - $blacklist = \OC::$server->getConfig()->getSystemValue('blacklisted_files', array('.htaccess')); + $blacklist = \OC::$server->getConfig()->getSystemValue('blacklisted_files', ['.htaccess']); $filename = strtolower(basename($filename)); return in_array($filename, $blacklist); } |