[Pkg-owncloud-commits] [owncloud] 117/199: Use instanceOfStorage instead of instanceof

David Prévot taffit at moszumanska.debian.org
Sun Jun 1 18:53:16 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 99d46af0b42dcf4ae221aebc862085615fc70af1
Author: Robin Appelman <icewind at owncloud.com>
Date:   Thu May 29 13:52:58 2014 +0200

    Use instanceOfStorage instead of instanceof
---
 apps/files_sharing/lib/proxy.php         | 2 +-
 apps/files_sharing/lib/sharedstorage.php | 2 +-
 lib/private/util.php                     | 5 ++++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/apps/files_sharing/lib/proxy.php b/apps/files_sharing/lib/proxy.php
index c899a4b..f595328 100644
--- a/apps/files_sharing/lib/proxy.php
+++ b/apps/files_sharing/lib/proxy.php
@@ -57,7 +57,7 @@ class Proxy extends \OC_FileProxy {
 		$mountManager = \OC\Files\Filesystem::getMountManager();
 		$mountedShares = $mountManager->findIn($path);
 		foreach ($mountedShares as $mount) {
-			if ($mount->getStorage() instanceof \OC\Files\Storage\Shared) {
+			if ($mount->getStorage()->instanceOfStorage('\OC\Files\Storage\Shared')) {
 				$mountPoint = $mount->getMountPoint();
 				$mountPointName = $mount->getMountPointName();
 				$target = \OCA\Files_Sharing\Helper::generateUniqueTarget(dirname($path) . '/' . $mountPointName, array(), $view);
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index 67ccbd1..a7dd2b3 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -300,7 +300,7 @@ class Shared extends \OC\Files\Storage\Common {
 
 		// it shouldn't be possible to move a Shared storage into another one
 		list($targetStorage, ) = \OC\Files\Filesystem::resolvePath($targetPath);
-		if ($targetStorage instanceof \OC\Files\Storage\Shared) {
+		if ($targetStorage->instanceOfStorage('\OC\Files\Storage\Shared')) {
 			\OCP\Util::writeLog('file sharing',
 					'It is not allowed to move one mount point into another one',
 					\OCP\Util::DEBUG);
diff --git a/lib/private/util.php b/lib/private/util.php
index 23c7053..bf7f39e 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -57,7 +57,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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list