Make api use zm.conf

This commit is contained in:
Isaac Connor 2016-04-30 13:50:09 -04:00
parent 0044161b9c
commit 4aafd1d417
2 changed files with 7 additions and 5 deletions

View File

@ -134,8 +134,10 @@ function loadConfigFile() {
continue; continue;
elseif ( preg_match( '/^\s*#/', $str )) elseif ( preg_match( '/^\s*#/', $str ))
continue; continue;
elseif ( preg_match( '/^\s*([^=\s]+)\s*=\s*(.*?)\s*$/', $str, $matches )) elseif ( preg_match( '/^\s*([^=\s]+)\s*=\s*(.*?)\s*$/', $str, $matches )) {
Configure::write("$matches[1]", "$matches[2]"); Configure::write("$matches[1]", "$matches[2]");
define( $matches[1], $matches[2] );
}
} }
fclose( $cfg ); fclose( $cfg );
} }

View File

@ -67,10 +67,10 @@ class DATABASE_CONFIG {
public $default = array( public $default = array(
'datasource' => 'Database/Mysql', 'datasource' => 'Database/Mysql',
'persistent' => false, 'persistent' => false,
'host' => '@ZM_DB_HOST@', 'host' => ZM_DB_HOST,
'login' => '@ZM_DB_USER@', 'login' => ZM_DB_USER,
'password' => '@ZM_DB_PASS@', 'password' => ZM_DB_PASS,
'database' => '@ZM_DB_NAME@', 'database' => ZM_DB_NAME,
'prefix' => '', 'prefix' => '',
//'encoding' => 'utf8', //'encoding' => 'utf8',
); );