Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-15 18:16:18 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-15 18:16:18 +0300
commite1d2ab83ccb5a6e671f024ebdd3dc329e82bb18e (patch)
tree6946b80feb950639dbffa10e26c368b0e1501150
parent6fd2f18b855c11e1716b0ec817fefc6cada7a21a (diff)
Set expiration date on password change
-rw-r--r--core/ajax/share.php2
-rw-r--r--core/js/share.js4
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');