fix deleting files with spaces in the name

remotes/origin/stable
Robin Appelman 14 years ago
parent 6cd5270967
commit 332cab0c55
  1. 2
      files/js/fileactions.js
  2. 4
      files/js/files.js

@ -86,7 +86,7 @@ FileActions.register('all','Download',function(filename){
FileActions.register('all','Delete',function(filename){
$.ajax({
url: 'ajax/delete.php',
data: "dir="+$('#dir').val()+"&file="+filename,
data: "dir="+encodeURIComponent($('#dir').val())+"&file="+encodeURIComponent(filename),
complete: function(data){
boolOperationFinished(data, function(){
FileList.remove(filename);

@ -117,7 +117,7 @@ $(document).ready(function() {
//send the browser to the download location
var dir=$('#dir').val()||'/';
// alert(files);
window.location='ajax/download.php?files='+files+'&dir='+dir;
window.location='ajax/download.php?files='+encodeURIComponent(files)+'&dir='+encodeURIComponent(dir);
return false;
});
@ -130,7 +130,7 @@ $(document).ready(function() {
$.ajax({
url: 'ajax/delete.php',
data: "dir="+$('#dir').val()+"&files="+files,
data: "dir="+$('#dir').val()+"&files="+encodeURIComponent(files),
complete: function(data){
boolOperationFinished(data, function(){
$('td.selection input:checkbox:checked').parent().parent().each(function(i,element){

Loading…
Cancel
Save