|
|
|
|
@ -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; |
|
|
|
|
}, |
|
|
|
|
/** |
|
|
|
|
|