Fixes for multi app dir :

Url should be given as relative path (to webroot)
Correct link construction from js
remotes/origin/stable45
Brice Maron 13 years ago
parent 8c28aec664
commit df60d6d5d2
  1. 3
      core/js/js.js
  2. 4
      lib/base.php

@ -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{

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

Loading…
Cancel
Save