mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
9f20268d3b
|
@ -23,6 +23,7 @@
|
|||
class Settings { /* {{{ */
|
||||
// Config File Path
|
||||
var $_configFilePath = null;
|
||||
var $_configFileDir = '';
|
||||
|
||||
// Fields not shown in gui
|
||||
var $_hiddenConfFields = '';
|
||||
|
@ -384,6 +385,8 @@ class Settings { /* {{{ */
|
|||
exit;
|
||||
}
|
||||
}
|
||||
$this->_configFileDir = dirname($this->_configFilePath);
|
||||
|
||||
if(!$this->load($configFilePath)) {
|
||||
echo "Your configuration contains errors.";
|
||||
exit;
|
||||
|
@ -1250,6 +1253,10 @@ class Settings { /* {{{ */
|
|||
* @return NULL|string config directory
|
||||
*/
|
||||
static function getConfigDir() { /* {{{ */
|
||||
if(defined("SEEDDMS_CONFIG_FILE"))
|
||||
return dirname(SEEDDMS_CONFIG_FILE);
|
||||
elseif(getenv("SEEDDMS_CONFIG_FILE"))
|
||||
return dirname(getenv("SEEDDMS_CONFIG_FILE"));
|
||||
$_tmp = dirname($_SERVER['SCRIPT_FILENAME']);
|
||||
$_arr = preg_split('/\//', rtrim(str_replace('\\', '/', $_tmp)));
|
||||
$configDir = null;
|
||||
|
|
|
@ -25,7 +25,7 @@ elseif(getenv("SEEDDMS_CONFIG_FILE"))
|
|||
$settings = new Settings(getenv("SEEDDMS_CONFIG_FILE"));
|
||||
else
|
||||
$settings = new Settings();
|
||||
if(!defined("SEEDDMS_INSTALL") && file_exists(dirname($settings->_configFilePath)."/ENABLE_INSTALL_TOOL")) {
|
||||
if(!defined("SEEDDMS_INSTALL") && file_exists($settings->_configFileDir."/ENABLE_INSTALL_TOOL")) {
|
||||
die("SeedDMS won't run unless your remove the file ENABLE_INSTALL_TOOL from your configuration directory.");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user