var downloadScope = 'file';
}
FileActions.register(downloadScope,'Download',function(){return OC.imagePath('core','actions/download')},function(filename){
- window.location='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()));
});
});
var dir=$('#dir').val()||'/';
$('#notification').text(t('files','generating ZIP-file, it may take some time.'));
$('#notification').fadeIn();
- window.location='ajax/download.php?files='+encodeURIComponent(files)+'&dir='+encodeURIComponent(dir);
+ window.location=OC.filePath('files', 'ajax', 'download.php?files='+encodeURIComponent(files)+'&dir='+encodeURIComponent(dir));
return false;
});
var target=$(this).text().trim();
var dir=$('#dir').val();
$.ajax({
- url: 'ajax/move.php',
+ url: OC.filePath('files', 'ajax', 'move.php'),
data: "dir="+encodeURIComponent(dir)+"&file="+encodeURIComponent(file)+'&target='+encodeURIComponent(dir)+'/'+encodeURIComponent(target),
complete: function(data){boolOperationFinished(data, function(){
var el = $('#fileList tr').filterAttr('data-file',file).find('td.filename');
return;
}
$.ajax({
- url: 'ajax/move.php',
+ url: OC.filePath('files', 'ajax', 'move.php'),
data: "dir="+encodeURIComponent(dir)+"&file="+encodeURIComponent(file)+'&target='+encodeURIComponent(target),
complete: function(data){boolOperationFinished(data, function(){
FileList.remove(file);
filePath:function(app,type,file){
var isCore=OC.coreApps.indexOf(app)!=-1;
var link=OC.webroot;
- if((file.substring(file.length-3) == 'php' || file.substring(file.length-3) == 'css') && !isCore){
+ var splitted = file.split('?');
+ if((splitted[0].substring(splitted[0].length-3) == 'php' || splitted[0].substring(splitted[0].length-3) == 'css') && !isCore){
link+='/?app=' + app + '&getfile=';
if(type){
link+=encodeURI(type + '/');
}
- link+= file;
+ link+= file + '?' + splitted[1];
}else if(file.substring(file.length-3) != 'php' && !isCore){
link=OC.appswebroot;
link+='/';