diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-15 18:16:18 +0300 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-15 18:16:18 +0300 |
commit | e1d2ab83ccb5a6e671f024ebdd3dc329e82bb18e (patch) | |
tree | 6946b80feb950639dbffa10e26c368b0e1501150 | |
parent | 6fd2f18b855c11e1716b0ec817fefc6cada7a21a (diff) |
Set expiration date on password change
-rw-r--r-- | core/ajax/share.php | 2 | ||||
-rw-r--r-- | core/js/share.js | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index 089f85a8d58..c1eaa8ec260 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -64,7 +64,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo $response = []; if (is_string($token)) { - $item = OCP\Share::getShareByToken($token); + $item = OCP\Share::getShareByToken($token, false); $response['data'] = array('token' => $token, 'expiration' => $item['expiration']); } diff --git a/core/js/share.js b/core/js/share.js index 7fc32749bc4..79fcf61c215 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -1205,6 +1205,10 @@ $(document).ready(function() { OC.Share.showLink(data.token, "password set", itemSource); OC.Share.updateIcon(itemType, itemSource); } + + if (data.expiration) { + OC.Share.showExpirationDate(data.expiration); + } $('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares})); }, function(result) { $loading.addClass('hidden'); |