From df60d6d5d2e905d3df9095d244e756fd60fd8c01 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Fri, 22 Jun 2012 12:24:10 +0200 Subject: [PATCH] Fixes for multi app dir : Url should be given as relative path (to webroot) Correct link construction from js --- core/js/js.js | 3 +-- lib/base.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/js/js.js b/core/js/js.js index a1ad0c7718..7a53bb75ef 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -64,9 +64,8 @@ OC={ } }else if(file.substring(file.length-3) != 'php' && !isCore){ link=OC.appswebroots[app]; - link+='/'+app+'/'; if(type){ - link+=type+'/'; + link+= '/'+type+'/'; } link+=file; }else{ diff --git a/lib/base.php b/lib/base.php index 22dd86535a..870550f267 100644 --- a/lib/base.php +++ b/lib/base.php @@ -140,9 +140,9 @@ class OC{ OC::$APPSROOTS[] = $paths; } }elseif(file_exists(OC::$SERVERROOT.'/apps')){ - OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'url' => OC::$WEBROOT.'/apps/', 'writable' => true); + OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'url' => '/apps/', 'writable' => true); }elseif(file_exists(OC::$SERVERROOT.'/../apps')){ - OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'url' => rtrim(dirname(OC::$WEBROOT), '/').'/apps/', 'writable' => true); + OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'url' => '/apps/', 'writable' => true); OC::$APPSROOT=rtrim(dirname(OC::$SERVERROOT), '/'); }