Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-09-29 13:23:18 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2014-10-01 17:13:48 +0400
commit92540737861a523593d69a4d90c2aa582d795f7a (patch)
treeb8a5725cce1ba3b0c5bb3c2d7fc935e136abb657 /lib/private/share
parentbb703006da0ac60abefaedbaf3b61245cc07d4c4 (diff)
some small fixed, suggested by scrutinizer
Diffstat (limited to 'lib/private/share')
-rw-r--r--lib/private/share/helper.php4
-rw-r--r--lib/private/share/hooks.php2
-rw-r--r--lib/private/share/share.php3
3 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/share/helper.php b/lib/private/share/helper.php
index 90dd12e9842..2418535c9d5 100644
--- a/lib/private/share/helper.php
+++ b/lib/private/share/helper.php
@@ -36,6 +36,7 @@ class Helper extends \OC\Share\Constants {
* @return string Item target
*/
public static function generateTarget($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $suggestedTarget = null, $groupParent = null) {
+ // FIXME: $uidOwner and $groupParent seems to be unused
$backend = \OC\Share\Share::getBackend($itemType);
if ($shareType == self::SHARE_TYPE_LINK) {
if (isset($suggestedTarget)) {
@@ -53,9 +54,6 @@ class Helper extends \OC\Share\Constants {
if ($shareType == self::SHARE_TYPE_USER) {
// Share with is a user, so set share type to user and groups
$shareType = self::$shareTypeUserAndGroups;
- $userAndGroups = array_merge(array($shareWith), \OC_Group::getUserGroups($shareWith));
- } else {
- $userAndGroups = false;
}
$exclude = array();
diff --git a/lib/private/share/hooks.php b/lib/private/share/hooks.php
index 2be7dc85e3c..66b197b921b 100644
--- a/lib/private/share/hooks.php
+++ b/lib/private/share/hooks.php
@@ -65,7 +65,7 @@ class Hooks extends \OC\Share\Constants {
// do we also need a file target
if ($item['item_type'] === 'file' || $item['item_type'] === 'folder') {
- $fileTarget = Helper::generateTarget('file', $row['file_target'], self::SHARE_TYPE_USER, $arguments['uid'],
+ $fileTarget = Helper::generateTarget('file', $item['file_target'], self::SHARE_TYPE_USER, $arguments['uid'],
$item['owner'], null, $item['parent']);
} else {
$fileTarget = null;
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index d6b1a2c6eef..cfdc8aa9ffe 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -703,7 +703,7 @@ class Share extends \OC\Share\Constants {
// if there is more then one result we don't have to delete the children
// but update their parent. For group shares the new parent should always be
// the original group share and not the db entry with the unique name
- } else if ((int)$item['share_type'] === \OCP\Share::$shareTypeGroupUserUnique) {
+ } else if ((int)$item['share_type'] === self::$shareTypeGroupUserUnique) {
$newParent = $item['parent'];
} else {
$newParent = $item['id'];
@@ -1610,6 +1610,7 @@ class Share extends \OC\Share\Constants {
$permissions, $parentFolder = null, $token = null, $itemSourceName = null, \DateTime $expirationDate = null) {
$queriesToExecute = array();
+ $suggestedItemTarget = null;
$result = self::checkReshare($itemType, $itemSource, $shareType, $shareWith, $uidOwner, $permissions, $itemSourceName, $expirationDate);
if(!empty($result)) {