From: Daniel Hansson Date: Wed, 9 Jul 2014 12:40:05 +0000 (+0200) Subject: Fix for #9422 X-Git-Tag: v8.0.0alpha1~1106^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=851c1f87d6acdb31ab0752fd0ba85d18b983822c;p=nextcloud-server.git Fix for #9422 --- diff --git a/lib/private/share/share.php b/lib/private/share/share.php index d356d6037ff..691a2053a82 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -946,22 +946,19 @@ class Share extends \OC\Share\Constants { $query->bindValue(4, $user); $query->bindValue(5, \OCP\Share::SHARE_TYPE_LINK); - $result = $query->execute(); - - if ($result === 1) { - \OC_Hook::emit('OCP\Share', 'post_set_expiration_date', array( - 'itemType' => $itemType, - 'itemSource' => $itemSource, - 'date' => $date, - 'uidOwner' => $user - )); - } else { - \OCP\Util::writeLog('sharing', "Couldn't set expire date'", \OCP\Util::ERROR); - } + $query->execute(); - return ($result === 1) ? true : false; - } + \OC_Hook::emit('OCP\Share', 'post_set_expiration_date', array( + 'itemType' => $itemType, + 'itemSource' => $itemSource, + 'date' => $date, + 'uidOwner' => $user + )); + + return true; + } + /** * Checks whether a share has expired, calls unshareItem() if yes. * @param array $item Share data (usually database row)