]> source.dussan.org Git - nextcloud-server.git/commitdiff
take share by mail into consideration if we calculate the access list 3843/head
authorBjoern Schiessle <bjoern@schiessle.org>
Tue, 14 Mar 2017 16:40:42 +0000 (17:40 +0100)
committerBjoern Schiessle <bjoern@schiessle.org>
Tue, 14 Mar 2017 16:40:42 +0000 (17:40 +0100)
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
lib/private/Share/Share.php

index da4b7dda91cee3ac69a28cd95c2e5a14d092bd32..8aea6049de56aded4cca9bb64c1f38bcca3cd1d2 100644 (file)
@@ -269,10 +269,10 @@ class Share extends Constants {
                                $query = \OC_DB::prepare('
                                        SELECT `share_with`
                                        FROM `*PREFIX*share`
-                                       WHERE `item_source` = ? AND `share_type` = ? AND `item_type` IN (\'file\', \'folder\')', 1
+                                       WHERE `item_source` = ? AND `share_type` IN (?, ?) AND `item_type` IN (\'file\', \'folder\')', 1
                                );
 
-                               $result = $query->execute(array($source, self::SHARE_TYPE_LINK));
+                               $result = $query->execute(array($source, self::SHARE_TYPE_LINK, self::SHARE_TYPE_EMAIL));
 
                                if (\OCP\DB::isError($result)) {
                                        \OCP\Util::writeLog('OCP\Share', \OC_DB::getErrorMessage(), \OCP\Util::ERROR);
@@ -2881,7 +2881,7 @@ class Share extends Constants {
 
        /**
         * @param IConfig $config
-        * @return bool 
+        * @return bool
         */
        public static function enforcePassword(IConfig $config) {
                $enforcePassword = $config->getAppValue('core', 'shareapi_enforce_links_password', 'no');