summaryrefslogtreecommitdiffstats
path: root/core/js/share.js
diff options
context:
space:
mode:
authorkondou <kondou@ts.unde.re>2014-04-07 23:16:25 +0200
committerkondou <kondou@ts.unde.re>2014-09-04 15:23:53 +0200
commit0f2ad9862e98e00fdc250bf8405bf6404d40b1ed (patch)
tree8ad4be8240caedd163f810018b0c7fe0b5d388b0 /core/js/share.js
parent1a7df3323391f6d6f7ef04de2687b3a566ab6351 (diff)
downloadnextcloud-server-0f2ad9862e98e00fdc250bf8405bf6404d40b1ed.tar.gz
nextcloud-server-0f2ad9862e98e00fdc250bf8405bf6404d40b1ed.zip
Initial work on shorter links
Diffstat (limited to 'core/js/share.js')
-rw-r--r--core/js/share.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js
index f1652370d35..d00b5f1ccf9 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -663,6 +663,8 @@ OC.Share={
// TODO: use oc webroot ?
var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service=files&'+type+'='+encodeURIComponent(file);
} else {
+ // convert the token to base36
+ //token = parseInt(token, 16).toString(36);
//TODO add path param when showing a link to file in a subfolder of a public link share
var service='';
if(linkSharetype === 'folder' || linkSharetype === 'file'){
@@ -672,8 +674,11 @@ OC.Share={
}
// TODO: use oc webroot ?
- var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service='+service+'&t='+token;
-
+ if (service !== 'files') {
+ var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 'public.php')+'?service='+service+'&t='+token;
+ } else {
+ var link = parent.location.protocol+'//'+location.host+OC.linkTo('', 's.php')+'?t='+token;
+ }
}
$('#linkText').val(link);
$('#linkText').show('blind');