diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-02 22:30:24 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-02 22:30:24 +0100 |
commit | 1291303c5a312fad9f01fbaf22cc21e3b9b3675d (patch) | |
tree | c1e46efc7589c3101a8c3806ecc3112c8f3e2849 /apps | |
parent | 88c9ae129e7dcc0e10aee682c8d4fa31b93b614c (diff) | |
download | nextcloud-server-1291303c5a312fad9f01fbaf22cc21e3b9b3675d.tar.gz nextcloud-server-1291303c5a312fad9f01fbaf22cc21e3b9b3675d.zip |
Replace OC.Router.generate() with OC.generateUrl()
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'; |