diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-10-20 23:48:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-20 23:48:15 +0200 |
commit | 2799b0a821a434b9db68952b85105f6281e63faa (patch) | |
tree | 1af301f54116b1137b9331332203966ee1e3c4f4 /lib/private | |
parent | 1dd7072b4183d81d9323a42dfdad025f0bfe53d8 (diff) | |
parent | fca8bd44ab3f8f694c82e2ba5401593e0e26acdb (diff) | |
download | nextcloud-server-2799b0a821a434b9db68952b85105f6281e63faa.tar.gz nextcloud-server-2799b0a821a434b9db68952b85105f6281e63faa.zip |
Merge pull request #1835 from nextcloud/downstream-24948
Move OC\Files\Storage\Shared to the right namespace
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Encryption/DecryptAll.php | 2 | ||||
-rw-r--r-- | lib/private/Encryption/EncryptionWrapper.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Common.php | 4 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Wrapper.php | 4 | ||||
-rw-r--r-- | lib/private/Files/View.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/helper.php | 2 | ||||
-rw-r--r-- | lib/private/legacy/util.php | 5 |
7 files changed, 14 insertions, 7 deletions
diff --git a/lib/private/Encryption/DecryptAll.php b/lib/private/Encryption/DecryptAll.php index b84395b9e17..caf4237ab9c 100644 --- a/lib/private/Encryption/DecryptAll.php +++ b/lib/private/Encryption/DecryptAll.php @@ -211,7 +211,7 @@ class DecryptAll { $content = $this->rootView->getDirectoryContent($root); foreach ($content as $file) { // only decrypt files owned by the user - if($file->getStorage()->instanceOfStorage('OC\Files\Storage\Shared')) { + if($file->getStorage()->instanceOfStorage('OCA\Files_Sharing\SharedStorage')) { continue; } $path = $root . '/' . $file['name']; diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php index 233390f8739..573fe0159ea 100644 --- a/lib/private/Encryption/EncryptionWrapper.php +++ b/lib/private/Encryption/EncryptionWrapper.php @@ -81,7 +81,7 @@ class EncryptionWrapper { 'mount' => $mount ]; - if (!$storage->instanceOfStorage('OC\Files\Storage\Shared') + if (!$storage->instanceOfStorage('OCA\Files_Sharing\SharedStorage') && !$storage->instanceOfStorage('OCA\Files_Sharing\External\Storage') && !$storage->instanceOfStorage('OC\Files\Storage\OwnCloud')) { diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php index 63d3c004fd2..c975791295d 100644 --- a/lib/private/Files/Storage/Common.php +++ b/lib/private/Files/Storage/Common.php @@ -466,6 +466,10 @@ abstract class Common implements Storage, ILockingStorage { * @return bool */ public function instanceOfStorage($class) { + if (ltrim($class, '\\') === 'OC\Files\Storage\Shared') { + // FIXME Temporary fix to keep existing checks working + $class = '\OCA\Files_Sharing\SharedStorage'; + } return is_a($this, $class); } diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php index c52b3394832..71b64d8c82c 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -483,6 +483,10 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage { * @return bool */ public function instanceOfStorage($class) { + if (ltrim($class, '\\') === 'OC\Files\Storage\Shared') { + // FIXME Temporary fix to keep existing checks working + $class = '\OCA\Files_Sharing\SharedStorage'; + } return is_a($this, $class) or $this->getWrapperStorage()->instanceOfStorage($class); } diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index fa6ba20c342..79c4d4cabed 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1357,7 +1357,7 @@ class View { $subStorage = $mount->getStorage(); if ($subStorage) { // exclude shared storage ? - if ($extOnly && $subStorage instanceof \OC\Files\Storage\Shared) { + if ($extOnly && $subStorage instanceof \OCA\Files_Sharing\SharedStorage) { continue; } $subCache = $subStorage->getCache(''); diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php index 0b9477dacd4..65b4c0d8afe 100644 --- a/lib/private/legacy/helper.php +++ b/lib/private/legacy/helper.php @@ -557,7 +557,7 @@ class OC_Helper { $quota = \OCP\Files\FileInfo::SPACE_UNLIMITED; $storage = $rootInfo->getStorage(); $sourceStorage = $storage; - if ($storage->instanceOfStorage('\OC\Files\Storage\Shared')) { + if ($storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage')) { $includeExtStorage = false; $sourceStorage = $storage->getSourceStorage(); } diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index b8f3a93ba50..b6c3b375396 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -165,15 +165,14 @@ class OC_Util { // install storage availability wrapper, before most other wrappers \OC\Files\Filesystem::addStorageWrapper('oc_availability', function ($mountPoint, $storage) { - /** @var \OCP\Files\Storage $storage */ - if (!$storage->instanceOfStorage('\OC\Files\Storage\Shared') && !$storage->isLocal()) { + if (!$storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage') && !$storage->isLocal()) { return new \OC\Files\Storage\Wrapper\Availability(['storage' => $storage]); } return $storage; }); \OC\Files\Filesystem::addStorageWrapper('oc_encoding', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) { - if ($mount->getOption('encoding_compatibility', false) && !$storage->instanceOfStorage('\OC\Files\Storage\Shared') && !$storage->isLocal()) { + if ($mount->getOption('encoding_compatibility', false) && !$storage->instanceOfStorage('\OCA\Files_Sharing\SharedStorage') && !$storage->isLocal()) { return new \OC\Files\Storage\Wrapper\Encoding(['storage' => $storage]); } return $storage; |