diff options
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 9 |
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'); |