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;
elseif ( preg_match( '/^\s*#/', $str ))
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]");
define( $matches[1], $matches[2] );
}
}
fclose( $cfg );
}

View File

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