Merge pull request #13928 from owncloud/prevent_ghost_files_master

prevent creation of ghost directories
This commit is contained in:
Vincent Petry 2015-02-09 18:15:45 +01:00
commit c4d9ae8af4

View file

@ -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'],
);