Use instanceOfStorage instead of instanceof
This commit is contained in:
parent
8c5521fdfc
commit
99d46af0b4
|
@ -57,7 +57,7 @@ class Proxy extends \OC_FileProxy {
|
||||||
$mountManager = \OC\Files\Filesystem::getMountManager();
|
$mountManager = \OC\Files\Filesystem::getMountManager();
|
||||||
$mountedShares = $mountManager->findIn($path);
|
$mountedShares = $mountManager->findIn($path);
|
||||||
foreach ($mountedShares as $mount) {
|
foreach ($mountedShares as $mount) {
|
||||||
if ($mount->getStorage() instanceof \OC\Files\Storage\Shared) {
|
if ($mount->getStorage()->instanceOfStorage('\OC\Files\Storage\Shared')) {
|
||||||
$mountPoint = $mount->getMountPoint();
|
$mountPoint = $mount->getMountPoint();
|
||||||
$mountPointName = $mount->getMountPointName();
|
$mountPointName = $mount->getMountPointName();
|
||||||
$target = \OCA\Files_Sharing\Helper::generateUniqueTarget(dirname($path) . '/' . $mountPointName, array(), $view);
|
$target = \OCA\Files_Sharing\Helper::generateUniqueTarget(dirname($path) . '/' . $mountPointName, array(), $view);
|
||||||
|
|
|
@ -300,7 +300,7 @@ class Shared extends \OC\Files\Storage\Common {
|
||||||
|
|
||||||
// it shouldn't be possible to move a Shared storage into another one
|
// it shouldn't be possible to move a Shared storage into another one
|
||||||
list($targetStorage, ) = \OC\Files\Filesystem::resolvePath($targetPath);
|
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',
|
\OCP\Util::writeLog('file sharing',
|
||||||
'It is not allowed to move one mount point into another one',
|
'It is not allowed to move one mount point into another one',
|
||||||
\OCP\Util::DEBUG);
|
\OCP\Util::DEBUG);
|
||||||
|
|
|
@ -57,7 +57,10 @@ class OC_Util {
|
||||||
// set up quota for home storages, even for other users
|
// set up quota for home storages, even for other users
|
||||||
// which can happen when using sharing
|
// 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();
|
$user = $storage->getUser()->getUID();
|
||||||
$quota = OC_Util::getUserQuota($user);
|
$quota = OC_Util::getUserQuota($user);
|
||||||
if ($quota !== \OC\Files\SPACE_UNLIMITED) {
|
if ($quota !== \OC\Files\SPACE_UNLIMITED) {
|
||||||
|
|
Loading…
Reference in New Issue