diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-04-20 22:35:12 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-04-20 22:35:12 +0200 |
commit | 12ef2f5054ebae12853f51d067993b825e4b4286 (patch) | |
tree | 771f6d641315bd0b8173c8c5a20744038d9cedb7 /core/js/js.js | |
parent | c3d78cf77aa18b54cb2d1c9d0e16874a0fea804e (diff) | |
download | nextcloud-server-12ef2f5054ebae12853f51d067993b825e4b4286.tar.gz nextcloud-server-12ef2f5054ebae12853f51d067993b825e4b4286.zip |
modify OC.filepath for movable apps
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/core/js/js.js b/core/js/js.js index 019c40a0e1b..9b0a159b5c2 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -32,7 +32,7 @@ t.cache={}; OC={ webroot:oc_webroot, currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false, - coreApps:['files','admin','log','search','settings','core','3rdparty'], + coreApps:['admin','log','search','settings','core','3rdparty'], /** * get an absolute url to a file in an appen * @param app the id of the app the file belongs to @@ -51,16 +51,21 @@ OC={ */ filePath:function(app,type,file){ var isCore=OC.coreApps.indexOf(app)!=-1; - app+='/'; - var link=OC.webroot+'/'; - if(!isCore){ - link+='apps/'; - } - link+=app; - if(type){ - link+=type+'/'; + var link=OC.webroot; + if(file.substring(file.length-3) == 'php' && !isCore){ + link+='/?app=' + app + '&file=' + type + '/' + file; + }else{ + link+='/'; + app+='/'; + if(!isCore){ + link+='apps/'; + } + link+=app; + if(type){ + link+=type+'/'; + } + link+=file; } - link+=file; return link; }, /** |