some small fixes

This commit is contained in:
Bjoern Schiessle 2014-09-25 11:29:57 +02:00
parent 5c7fe91041
commit d5fc011c90
4 changed files with 6 additions and 11 deletions

View File

@ -58,7 +58,7 @@ class SharedMount extends Mount implements MoveableMount {
* update fileTarget in the database if the mount point changed * update fileTarget in the database if the mount point changed
* @param string $newPath * @param string $newPath
* @param array $share reference to the share which should be modified * @param array $share reference to the share which should be modified
* @return type * @return bool
*/ */
private static function updateFileTarget($newPath, &$share) { 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 // 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() { public function removeMount() {
$mountManager = \OC\Files\Filesystem::getMountManager(); $mountManager = \OC\Files\Filesystem::getMountManager();
/** /** @var \OC\Files\Storage\Shared */
* @var \OC\Files\Storage\Shared
*/
$storage = $this->getStorage(); $storage = $this->getStorage();
$result = $storage->unshareStorage(); $result = $storage->unshareStorage();
$mountManager->removeMount($this->mountPoint); $mountManager->removeMount($this->mountPoint);

View File

@ -534,6 +534,8 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
/** /**
* unshare complete storage, also the grouped shares * unshare complete storage, also the grouped shares
*
* @return bool
*/ */
public function unshareStorage() { public function unshareStorage() {
$result = true; $result = true;

View File

@ -340,7 +340,7 @@ class Share extends \OC\Share\Constants {
* @param mixed $parameters * @param mixed $parameters
* @param boolean $includeCollections * @param boolean $includeCollections
* @param string $shareWith (optional) define against which user should be checked, default: current user * @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, public static function getItemSharedWithBySource($itemType, $itemSource, $format = self::FORMAT_NONE,
$parameters = null, $includeCollections = false, $shareWith = null) { $parameters = null, $includeCollections = false, $shareWith = null) {
@ -1576,11 +1576,6 @@ class Share extends \OC\Share\Constants {
$queriesToExecute = array(); $queriesToExecute = array();
$fileShare = false;
if ($itemType === 'file' || $itemType === 'folder') {
$fileShare = true;
}
$result = self::checkReshare($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, $itemSourceName, $expirationDate); $result = self::checkReshare($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, $itemSourceName, $expirationDate);
if(!empty($result)) { if(!empty($result)) {
$parent = $result['parent']; $parent = $result['parent'];

View File

@ -139,7 +139,7 @@ class Share extends \OC\Share\Constants {
* @param int $format (optional) Format type must be defined by the backend * @param int $format (optional) Format type must be defined by the backend
* @param mixed $parameters * @param mixed $parameters
* @param bool $includeCollections * @param bool $includeCollections
* @return mixed Return depends on format * @return array
*/ */
public static function getItemSharedWithBySource($itemType, $itemSource, $format = self::FORMAT_NONE, public static function getItemSharedWithBySource($itemType, $itemSource, $format = self::FORMAT_NONE,
$parameters = null, $includeCollections = false) { $parameters = null, $includeCollections = false) {