]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix OC.filePath in main js
authorGeorg Ehrke <dev@georgswebsite.de>
Tue, 24 Apr 2012 19:54:09 +0000 (21:54 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Tue, 24 Apr 2012 19:54:09 +0000 (21:54 +0200)
core/js/js.js

index 25de7c13b74b0656a4f5d327fc76fcf7b20fcb80..a4369deb2830db52c1711c41a12b854ef5840cd1 100644 (file)
@@ -54,15 +54,20 @@ OC={
                var isCore=OC.coreApps.indexOf(app)!=-1;
                var link=OC.webroot;
                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){
                        link=OC.appswebroot;
+                       link+='/';
                        link+='apps/';
-                       link+=app;
+                       link+=app+'/';
                        if(type){
                                link+=type+'/';
                        }
-                       link+=file;     
+                       link+=file;
                }else{
                        link+='/';
                        app+='/';