Fix download url generation

This commit is contained in:
Bart Visscher 2012-10-27 15:10:21 +02:00
parent 0c40a061e4
commit 939b51e46f
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ $(document).ready(function(){
var downloadScope = 'file'; var downloadScope = 'file';
} }
FileActions.register(downloadScope,'Download', OC.PERMISSION_READ, function(){return OC.imagePath('core','actions/download');},function(filename){ FileActions.register(downloadScope,'Download', OC.PERMISSION_READ, function(){return OC.imagePath('core','actions/download');},function(filename){
window.location=OC.filePath('files', 'ajax', 'download.php') + '&files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val()); window.location=OC.filePath('files', 'ajax', 'download.php') + '?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val());
}); });
}); });

View File

@ -62,7 +62,7 @@ function escapeHTML(s) {
* @return string * @return string
*/ */
function fileDownloadPath(dir, file) { function fileDownloadPath(dir, file) {
return OC.filePath('files', 'ajax', 'download.php')+'&files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir); return OC.filePath('files', 'ajax', 'download.php')+'?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir);
} }
var OC={ var OC={