[Pkg-owncloud-commits] [owncloud] 11/122: Cache the token value
David Prévot
taffit at moszumanska.debian.org
Sat May 9 00:00:01 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit e113d67430c0433e96c0de83e989bd6284fd0d63
Author: Olivier Paroz <github at oparoz.com>
Date: Thu Apr 16 19:23:42 2015 +0200
Cache the token value
---
apps/files_sharing/js/public.js | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 59ef971..cfb6569 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -87,6 +87,7 @@ OCA.Sharing.PublicApp = {
// dynamically load image previews
+ var token = $('#sharingToken').val();
var bottomMargin = 350;
var previewWidth = $(window).width() * window.devicePixelRatio;
var previewHeight = $(window).height() - bottomMargin * window.devicePixelRatio;
@@ -96,7 +97,7 @@ OCA.Sharing.PublicApp = {
y: previewHeight,
a: 'true',
file: encodeURIComponent(this.initialDir + $('#filename').val()),
- t: $('#sharingToken').val(),
+ t: token,
scalingup: 0
};
@@ -144,7 +145,6 @@ OCA.Sharing.PublicApp = {
filename = JSON.stringify(filename);
}
var path = dir || FileList.getCurrentDirectory();
- var token = $('#sharingToken').val();
var params = {
path: path,
files: filename
@@ -154,12 +154,11 @@ OCA.Sharing.PublicApp = {
this.fileList.getAjaxUrl = function (action, params) {
params = params || {};
- params.t = $('#sharingToken').val();
+ params.t = token;
return OC.filePath('files_sharing', 'ajax', action + '.php') + '?' + OC.buildQueryString(params);
};
this.fileList.linkTo = function (dir) {
- var token = $('#sharingToken').val();
var params = {
dir: dir
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list