summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-04-29 15:14:48 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-06-14 10:10:37 +0200
commit65f3b2fad235417d3f653c9e11aa8d72e8944d28 (patch)
treefa863ea6c687bd42343e001be6dc975325a91c75 /lib
parent4a26219ecf3abe9c1b18d434b8e70a6f9878199c (diff)
downloadnextcloud-server-65f3b2fad235417d3f653c9e11aa8d72e8944d28.tar.gz
nextcloud-server-65f3b2fad235417d3f653c9e11aa8d72e8944d28.zip
Add server<->server sharing backend
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/directory.php3
-rw-r--r--lib/private/connector/sabre/objecttree.php2
-rw-r--r--lib/private/files/cache/cache.php10
-rw-r--r--lib/private/helper.php2
-rw-r--r--lib/private/share/share.php2
5 files changed, 10 insertions, 9 deletions
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php
index aa467cec535..9904c3525c4 100644
--- a/lib/private/connector/sabre/directory.php
+++ b/lib/private/connector/sabre/directory.php
@@ -202,7 +202,8 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
* @return array
*/
public function getQuotaInfo() {
- $storageInfo = OC_Helper::getStorageInfo($this->path);
+ $path = \OC\Files\Filesystem::getView()->getRelativePath($this->info->getPath());
+ $storageInfo = OC_Helper::getStorageInfo($path);
return array(
$storageInfo['used'],
$storageInfo['free']
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index c55a392bca0..2cadb5af520 100644
--- a/lib/private/connector/sabre/objecttree.php
+++ b/lib/private/connector/sabre/objecttree.php
@@ -117,7 +117,7 @@ class ObjectTree extends \Sabre\DAV\ObjectTree {
$isShareMountPoint = false;
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath( '/' . \OCP\User::getUser() . '/files/' . $sourcePath);
- if ($storage instanceof \OC\Files\Storage\Shared && !$internalPath) {
+ if ($storage instanceof \OCA\Files_Sharing\ISharedStorage && !$internalPath) {
$isShareMountPoint = true;
}
diff --git a/lib/private/files/cache/cache.php b/lib/private/files/cache/cache.php
index bfd280a91a1..48c57e2e439 100644
--- a/lib/private/files/cache/cache.php
+++ b/lib/private/files/cache/cache.php
@@ -22,20 +22,20 @@ class Cache {
/**
* @var array partial data for the cache
*/
- private $partial = array();
+ protected $partial = array();
/**
* @var string
*/
- private $storageId;
+ protected $storageId;
/**
* @var Storage $storageCache
*/
- private $storageCache;
+ protected $storageCache;
- private static $mimetypeIds = array();
- private static $mimetypes = array();
+ protected static $mimetypeIds = array();
+ protected static $mimetypes = array();
/**
* @param \OC\Files\Storage\Storage|string $storage
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 3e2c1db79da..243baa46948 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -940,7 +940,7 @@ class OC_Helper {
// return storage info without adding mount points
$includeExtStorage = \OC_Config::getValue('quota_include_external_storage', false);
- if (is_null($rootInfo)) {
+ if (!$rootInfo) {
$rootInfo = \OC\Files\Filesystem::getFileInfo($path, false);
}
$used = $rootInfo->getSize();
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index a3de8ebc0ef..0a4d9a913e2 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -510,7 +510,7 @@ class Share extends \OC\Share\Constants {
$mountManager = \OC\Files\Filesystem::getMountManager();
$mounts = $mountManager->getAll();
foreach ($mounts as $mountPoint => $mount) {
- if ($mount->getStorage() instanceof \OC\Files\Storage\Shared && strpos($mountPoint, $path) === 0) {
+ if ($mount->getStorage() instanceof \OCA\Files_Sharing\ISharedStorage && strpos($mountPoint, $path) === 0) {
$message = 'Sharing "' . $itemSourceName . '" failed, because it contains files shared with you!';
\OC_Log::write('OCP\Share', $message, \OC_Log::ERROR);
throw new \Exception($message);