summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-05-29 13:52:58 +0200
committerRobin Appelman <icewind@owncloud.com>2014-06-04 14:29:55 +0200
commitb3c8b574df65aa96206bbaf15e18647692d1cf37 (patch)
tree6bd91b9079afee8332e6e7e143d93aa4b4d14505 /lib
parent79b953a9200f653bc2dcdd395dbb14e1df79ad75 (diff)
downloadnextcloud-server-b3c8b574df65aa96206bbaf15e18647692d1cf37.tar.gz
nextcloud-server-b3c8b574df65aa96206bbaf15e18647692d1cf37.zip
Use instanceOfStorage instead of instanceof
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files.php8
-rwxr-xr-xlib/private/util.php5
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/private/files.php b/lib/private/files.php
index 4fd55cc8e9c..6382d0dec43 100644
--- a/lib/private/files.php
+++ b/lib/private/files.php
@@ -131,10 +131,10 @@ class OC_Files {
}
if ($xsendfile) {
list($storage) = \OC\Files\Filesystem::resolvePath(\OC\Files\Filesystem::getView()->getAbsolutePath($filename));
- if ($storage instanceof \OC\Files\Storage\Wrapper\Wrapper) {
- $storage = $storage->getWrapperStorage();
- }
- if ($storage instanceof \OC\Files\Storage\Local) {
+ /**
+ * @var \OC\Files\Storage\Storage $storage
+ */
+ if ($storage->instanceOfStorage('\OC\Files\Storage\Local')) {
self::addSendfileHeader(\OC\Files\Filesystem::getLocalFile($filename));
}
}
diff --git a/lib/private/util.php b/lib/private/util.php
index 59010421924..a88665420fd 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -61,7 +61,10 @@ class OC_Util {
// set up quota for home storages, even for other users
// which can happen when using sharing
- if ($storage instanceof \OC\Files\Storage\Home) {
+ /**
+ * @var \OC\Files\Storage\Storage $storage
+ */
+ if ($storage->instanceOfStorage('\OC\Files\Storage\Home')) {
$user = $storage->getUser()->getUID();
$quota = OC_Util::getUserQuota($user);
if ($quota !== \OC\Files\SPACE_UNLIMITED) {