fix OC.filePath in main js

This commit is contained in:
Georg Ehrke 2012-04-24 21:54:09 +02:00
parent a85d49833b
commit d6346b5b0b
1 changed files with 8 additions and 3 deletions

View File

@ -54,15 +54,20 @@ OC={
var isCore=OC.coreApps.indexOf(app)!=-1; var isCore=OC.coreApps.indexOf(app)!=-1;
var link=OC.webroot; var link=OC.webroot;
if(file.substring(file.length-3) == 'php' && !isCore){ if(file.substring(file.length-3) == 'php' && !isCore){
link+='/?app=' + app + '&getfile=' + encodeURI(type + '/' + file); link+='/?app=' + app + '&getfile=';
if(type){
link+=encodeURI(type + '/');
}
link+= file;
}else if(file.substring(file.length-3) != 'php' && !isCore){ }else if(file.substring(file.length-3) != 'php' && !isCore){
link=OC.appswebroot; link=OC.appswebroot;
link+='/';
link+='apps/'; link+='apps/';
link+=app; link+=app+'/';
if(type){ if(type){
link+=type+'/'; link+=type+'/';
} }
link+=file; link+=file;
}else{ }else{
link+='/'; link+='/';
app+='/'; app+='/';