for password protected link shares the password is stored in shareWith, so we need to set this manually to null for the hooks

This commit is contained in:
Bjoern Schiessle 2015-02-05 17:11:27 +01:00
parent 7a9d428d6f
commit 1448f281b7
1 changed files with 9 additions and 2 deletions

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