From d5fc011c9059a0362903abc85fa2af43a7dd89f4 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 25 Sep 2014 11:29:57 +0200 Subject: [PATCH] some small fixes --- apps/files_sharing/lib/sharedmount.php | 6 ++---- apps/files_sharing/lib/sharedstorage.php | 2 ++ lib/private/share/share.php | 7 +------ lib/public/share.php | 2 +- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/apps/files_sharing/lib/sharedmount.php b/apps/files_sharing/lib/sharedmount.php index 9469e0aa48..1717a4bd63 100644 --- a/apps/files_sharing/lib/sharedmount.php +++ b/apps/files_sharing/lib/sharedmount.php @@ -58,7 +58,7 @@ class SharedMount extends Mount implements MoveableMount { * update fileTarget in the database if the mount point changed * @param string $newPath * @param array $share reference to the share which should be modified - * @return type + * @return bool */ private static function updateFileTarget($newPath, &$share) { // if the user renames a mount point from a group share we need to create a new db entry @@ -152,9 +152,7 @@ class SharedMount extends Mount implements MoveableMount { */ public function removeMount() { $mountManager = \OC\Files\Filesystem::getMountManager(); - /** - * @var \OC\Files\Storage\Shared - */ + /** @var \OC\Files\Storage\Shared */ $storage = $this->getStorage(); $result = $storage->unshareStorage(); $mountManager->removeMount($this->mountPoint); diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index a6799ddd36..a2b485a2ca 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -534,6 +534,8 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { /** * unshare complete storage, also the grouped shares + * + * @return bool */ public function unshareStorage() { $result = true; diff --git a/lib/private/share/share.php b/lib/private/share/share.php index 6b903c003d..d681f35b03 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -340,7 +340,7 @@ class Share extends \OC\Share\Constants { * @param mixed $parameters * @param boolean $includeCollections * @param string $shareWith (optional) define against which user should be checked, default: current user - * @return mixed Return depends on format + * @return array */ public static function getItemSharedWithBySource($itemType, $itemSource, $format = self::FORMAT_NONE, $parameters = null, $includeCollections = false, $shareWith = null) { @@ -1576,11 +1576,6 @@ class Share extends \OC\Share\Constants { $queriesToExecute = array(); - $fileShare = false; - if ($itemType === 'file' || $itemType === 'folder') { - $fileShare = true; - } - $result = self::checkReshare($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, $itemSourceName, $expirationDate); if(!empty($result)) { $parent = $result['parent']; diff --git a/lib/public/share.php b/lib/public/share.php index a0b34a7899..449d1fa211 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -139,7 +139,7 @@ class Share extends \OC\Share\Constants { * @param int $format (optional) Format type must be defined by the backend * @param mixed $parameters * @param bool $includeCollections - * @return mixed Return depends on format + * @return array */ public static function getItemSharedWithBySource($itemType, $itemSource, $format = self::FORMAT_NONE, $parameters = null, $includeCollections = false) {