summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-06-01 14:29:31 +0200
committerMorris Jobke <hey@morrisjobke.de>2016-10-20 20:27:44 +0200
commit246bb9f33d23340d821384b25097066f65c5d483 (patch)
tree1f5b8692db952c537e54f1816eff9ec9949560a7 /lib
parent98c846456417989d995fe868731e2b1bd77f0f37 (diff)
downloadnextcloud-server-246bb9f33d23340d821384b25097066f65c5d483.tar.gz
nextcloud-server-246bb9f33d23340d821384b25097066f65c5d483.zip
Move OC\Files\Storage\Shared to the right namespace
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Encryption/EncryptionWrapper.php2
-rw-r--r--lib/private/Files/Storage/Common.php4
-rw-r--r--lib/private/Files/Storage/Wrapper/Wrapper.php4
-rw-r--r--lib/private/Files/View.php2
-rw-r--r--lib/private/legacy/helper.php2
-rw-r--r--lib/private/legacy/util.php5
6 files changed, 13 insertions, 6 deletions
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;