From b3c8b574df65aa96206bbaf15e18647692d1cf37 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 29 May 2014 13:52:58 +0200 Subject: [PATCH] Use instanceOfStorage instead of instanceof --- lib/private/files.php | 8 ++++---- lib/private/util.php | 5 ++++- 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) { -- 2.39.5