mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
initialize path if not explicitly set in settings.xml
This commit is contained in:
parent
590fc0c957
commit
cf30ad5ddd
|
@ -35,6 +35,31 @@ if(!trim($settings->_encryptionKey)) {
|
|||
$settings->save();
|
||||
}
|
||||
|
||||
/* Set some directories if not set in the configuration file */
|
||||
$__basedir = dirname(dirname(__DIR__));
|
||||
$__datadir = dirname(dirname(__DIR__))."/data";;
|
||||
if(empty($settings->_rootDir)) {
|
||||
$settings->_rootDir = $__basedir."/www/";
|
||||
}
|
||||
if(empty($settings->_contentDir)) {
|
||||
$settings->_contentDir = $__basedir;
|
||||
}
|
||||
if(empty($settings->_cacheDir)) {
|
||||
$settings->_cacheDir = $__datadir."/cache/";
|
||||
}
|
||||
if(empty($settings->_backupDir)) {
|
||||
$settings->_backupDir = $__datadir."/backup/";
|
||||
}
|
||||
if(empty($settings->_luceneDir)) {
|
||||
$settings->_luceneDir = $__datadir."/lucene/";
|
||||
}
|
||||
if(empty($settings->_stagingDir)) {
|
||||
$settings->_stagingDir = $__datadir."/lucene/";
|
||||
}
|
||||
if($settings->_dbDriver == 'sqlite' && empty($settings->_dbDatabase)) {
|
||||
$settings->_dbDatabase = $__datadir."/content.db";
|
||||
}
|
||||
|
||||
ini_set('include_path', $settings->_rootDir.'pear'. PATH_SEPARATOR .ini_get('include_path'));
|
||||
if(!empty($settings->_extraPath)) {
|
||||
ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path'));
|
||||
|
|
Loading…
Reference in New Issue
Block a user