Make api use zm.conf
This commit is contained in:
parent
0044161b9c
commit
4aafd1d417
|
@ -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 );
|
||||||
}
|
}
|
||||||
|
|
|
@ -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',
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue