diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-02-05 17:11:27 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2015-02-05 17:23:59 +0100 |
commit | 1448f281b719fdf28676bed6b1695703401be60f (patch) | |
tree | 632038fcdfc99659c505458185a1610c40d43813 /lib | |
parent | 7a9d428d6f6146d44883e2c5bab04db702792ce4 (diff) | |
download | nextcloud-server-1448f281b719fdf28676bed6b1695703401be60f.tar.gz nextcloud-server-1448f281b719fdf28676bed6b1695703401be60f.zip |
for password protected link shares the password is stored in shareWith, so we need to set this manually to null for the hooks
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/share/share.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index bd21bdd4b3a..53479ad7144 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -1166,13 +1166,20 @@ class Share extends \OC\Share\Constants { * @return null */ protected static function unshareItem(array $item, $newParent = null) { + + $shareType = (int)$item['share_type']; + $shareWith = null; + if ($shareType !== \OCP\Share::SHARE_TYPE_LINK) { + $shareWith = $item['share_with']; + } + // Pass all the vars we have for now, they may be useful $hookParams = array( 'id' => $item['id'], 'itemType' => $item['item_type'], 'itemSource' => $item['item_source'], - 'shareType' => (int)$item['share_type'], - 'shareWith' => $item['share_with'], + 'shareType' => $shareType, + 'shareWith' => $shareWith, 'itemParent' => $item['parent'], 'uidOwner' => $item['uid_owner'], ); |