diff options
author | Björn Schießle <schiessle@owncloud.com> | 2014-07-14 12:58:23 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2014-07-14 12:58:23 +0200 |
commit | 05ba9b3c64b5c4a109773fe776fd6a2ebd34502a (patch) | |
tree | 44527c5f0b1a5917e457e936509c721d442ee889 | |
parent | 45c3a948b9754e18634eef0c9682c145c124c650 (diff) | |
parent | 851c1f87d6acdb31ab0752fd0ba85d18b983822c (diff) | |
download | nextcloud-server-05ba9b3c64b5c4a109773fe776fd6a2ebd34502a.tar.gz nextcloud-server-05ba9b3c64b5c4a109773fe776fd6a2ebd34502a.zip |
Merge pull request #9539 from enoch85/patch-1
Fix for #9422
-rw-r--r-- | lib/private/share/share.php | 25 |
1 files changed, 11 insertions, 14 deletions
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) |