]> source.dussan.org Git - nextcloud-server.git/commitdiff
make sure that we set the expire date if a date is adefault date is set
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 28 Jul 2014 15:13:17 +0000 (17:13 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 28 Jul 2014 20:45:03 +0000 (22:45 +0200)
lib/private/share/share.php

index af286e7154ed8199fb52a7f0ed371b7a2cc364d3..2fc5598146c8dc69c5afbf7cca72bf44ff8628b5 100644 (file)
@@ -595,6 +595,7 @@ class Share extends \OC\Share\Constants {
                        $shareWith['group'] = $group;
                        $shareWith['users'] = array_diff(\OC_Group::usersInGroup($group), array($uidOwner));
                } else if ($shareType === self::SHARE_TYPE_LINK) {
+                       $updateExistingShare = false;
                        if (\OC_Appconfig::getValue('core', 'shareapi_allow_links', 'yes') == 'yes') {
 
                                // when updating a link share
@@ -629,7 +630,7 @@ class Share extends \OC\Share\Constants {
                                        throw new \Exception($message_t);
                                }
 
-                               if (!empty($updateExistingShare) &&
+                               if ($updateExistingShare === false &&
                                                self::isDefaultExpireDateEnabled() &&
                                                empty($expirationDate)) {
                                        $expirationDate = Helper::calcExpireDate();