]> source.dussan.org Git - nextcloud-server.git/commitdiff
for password protected link shares the password is stored in shareWith, so we need...
authorBjoern Schiessle <schiessle@owncloud.com>
Thu, 5 Feb 2015 16:11:27 +0000 (17:11 +0100)
committerBjoern Schiessle <schiessle@owncloud.com>
Thu, 5 Feb 2015 16:23:59 +0000 (17:23 +0100)
lib/private/share/share.php

index bd21bdd4b3ad84222c674af849812e5374b53766..53479ad71447416209e3051636d3b93e2809e55f 100644 (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'],
                );