mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2025-12-23 22:37:53 -05:00
Add db config entries to zm_configvals
This commit is contained in:
@@ -28,6 +28,7 @@ define( 'ZM_VERSION', '@VERSION@' ); // Version
|
||||
define( 'ZM_DIR_TEMP', '@ZM_TMPDIR@' );
|
||||
define( 'ZM_DIR_CACHE', '@ZM_CACHEDIR@' );
|
||||
global $zm_configvals;
|
||||
global $zm_config;
|
||||
|
||||
$configFile = ZM_CONFIG;
|
||||
$localConfigFile = basename($configFile);
|
||||
@@ -230,10 +231,9 @@ $GLOBALS['defaultUser'] = array(
|
||||
|
||||
function loadConfig( $defineConsts=true ) {
|
||||
global $zm_config;
|
||||
global $zm_configvals;
|
||||
global $dbConn;
|
||||
|
||||
$config = array();
|
||||
|
||||
$result = $dbConn->query('SELECT Name,Value,Type,Private FROM Config');
|
||||
if ( !$result )
|
||||
echo mysql_error();
|
||||
@@ -248,6 +248,7 @@ function loadConfig( $defineConsts=true ) {
|
||||
$zm_config[$row['Name']]['Value'] = constant($row['Name']);
|
||||
}
|
||||
}
|
||||
if (!isset($zm_configvals[$row['Name']])) $zm_configvals[$row['Name']] = $row['Value'];
|
||||
}
|
||||
return $zm_config;
|
||||
} # end function loadConfig
|
||||
|
||||
Reference in New Issue
Block a user