diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-02-09 18:15:45 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-02-09 18:15:45 +0100 |
commit | c4d9ae8af4dc34cc79cc73d16b7ee62f52cd5b5f (patch) | |
tree | 61194008a0670f12a62143ca12c32a5877828797 /lib | |
parent | 52967673936a74738dabdd8fdcd1ff458dc0da01 (diff) | |
parent | 1448f281b719fdf28676bed6b1695703401be60f (diff) | |
download | nextcloud-server-c4d9ae8af4dc34cc79cc73d16b7ee62f52cd5b5f.tar.gz nextcloud-server-c4d9ae8af4dc34cc79cc73d16b7ee62f52cd5b5f.zip |
Merge pull request #13928 from owncloud/prevent_ghost_files_master
prevent creation of ghost directories
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'], ); |