summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
authorBrice Maron <brice@bmaron.net>2012-06-07 20:36:55 +0000
committerBrice Maron <brice@bmaron.net>2012-06-07 20:36:55 +0000
commit9ec68c819bf409905e3e3ab17cb4b2dd925cbde7 (patch)
treefd115646b7a23b5d615949aea9cc8b84e8d9b83d /lib/base.php
parent9f1c46b6f6faebaebf555e0d26bcdef9e49daccc (diff)
downloadnextcloud-server-9ec68c819bf409905e3e3ab17cb4b2dd925cbde7.tar.gz
nextcloud-server-9ec68c819bf409905e3e3ab17cb4b2dd925cbde7.zip
Change parameter 'web' to 'url' and take array of array in config instead of : separated values
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/lib/base.php b/lib/base.php
index 9f2925fa314..6e85f1a7346 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -55,7 +55,7 @@ class OC{
*/
public static $THIRDPARTYWEBROOT = '';
/**
- * The installation path array of the apps folder on the server (e.g. /srv/http/owncloud) 'real' and web path in 'web'
+ * The installation path array of the apps folder on the server (e.g. /srv/http/owncloud) 'path' and web path in 'url'
*/
public static $APPSROOTS = array();
/*
@@ -161,22 +161,17 @@ class OC{
echo("3rdparty directory not found! Please put the ownCloud 3rdparty folder in the ownCloud folder or the folder above. You can also configure the location in the config.php file.");
exit;
}
-
// search the apps folder
- if(OC_Config::getValue('appsroot', '')<>''){
- $real_a = explode(':',OC_Config::getValue('appsroot', ''));
- $web_a = explode(':',OC_Config::getValue('appsurl', ''));
- foreach($real_a as $k => $path) {
- if(!isset($web_a[$k])){
- echo("Apps root and appsurl not mathing. You need to have the same number of paths");
- exit;
- }
- OC::$APPSROOTS[] = array('path'=> $path, 'web' => $web_a[$k]);
+ $config_paths = OC_Config::getValue('apps_paths', array());
+ if(! empty($config_paths)){
+ foreach($config_paths as $paths) {
+ if( isset($paths['url']) && isset($paths['path']))
+ OC::$APPSROOTS[] = $paths;
}
}elseif(file_exists(OC::$SERVERROOT.'/apps')){
- OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'web' => OC::$WEBROOT.'/apps/');
+ OC::$APPSROOTS[] = array('path'=> OC::$SERVERROOT.'/apps', 'url' => OC::$WEBROOT.'/apps/');
}elseif(file_exists(OC::$SERVERROOT.'/../apps')){
- OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'web' => rtrim(dirname(OC::$WEBROOT), '/').'/apps/');
+ OC::$APPSROOTS[] = array('path'=> rtrim(dirname(OC::$SERVERROOT), '/').'/apps', 'url' => rtrim(dirname(OC::$WEBROOT), '/').'/apps/');
OC::$APPSROOT=rtrim(dirname(OC::$SERVERROOT), '/');
}