diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 4 | ||||
-rw-r--r-- | apps/files/js/files.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/routes.php | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 550c10dba3e..c3c7f4c2b9b 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -137,7 +137,9 @@ window.FileList={ var download_url = null; if (!param.download_url) { - download_url = OC.Router.generate('download', { file: $('#dir').val()+'/'+name }); + download_url = OC.generateUrl( + '/download{file}', + { file: $('#dir').val()+'/'+name }); } else { download_url = param.download_url; } diff --git a/apps/files/js/files.js b/apps/files/js/files.js index f4546120702..c93862e85d8 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -780,9 +780,9 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) { if ( $('#isPublic').length ) { urlSpec.t = $('#dirToken').val(); - previewURL = OC.Router.generate('core_ajax_public_preview', urlSpec); + previewURL = OC.generateUrl('/publicpreview.png?') + $.param(urlSpec); } else { - previewURL = OC.Router.generate('core_ajax_preview', urlSpec); + previewURL = OC.generateUrl('/core/preview.png?') + $.param(urlSpec); } previewURL = previewURL.replace('(', '%28'); previewURL = previewURL.replace(')', '%29'); diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php index 3469829b6f7..9417a6eeb89 100644 --- a/apps/files_sharing/appinfo/routes.php +++ b/apps/files_sharing/appinfo/routes.php @@ -1,4 +1,5 @@ <?php +/** @var $this OC_Router */ $this->create('core_ajax_public_preview', '/publicpreview.png')->action( function() { require_once __DIR__ . '/../ajax/publicpreview.php'; |