Config file location can be configured by ENV var
Cette révision appartient à :
Parent
0aeb74d63d
révision
5844e0ef54
|
@ -4,8 +4,7 @@ spl_autoload_register(function ($class) {
|
|||
if (file_exists("lib/$class.php")) { require_once("lib/$class.php"); }
|
||||
});
|
||||
|
||||
Config::load('../config/config.ini');
|
||||
|
||||
Config::load();
|
||||
Logger::init();
|
||||
MailNotify::init();
|
||||
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
|
||||
class Config {
|
||||
private static $name='Evoadmin Mail', $mail='root@localhost', $log_level='error', $ldap=array();
|
||||
public static function load($file) {
|
||||
public static function load() {
|
||||
$file = getenv("EVOADMINMAIL_CONFIG_FILE") or $file = '../config/config.ini';
|
||||
$ini = parse_ini_file($file, true);
|
||||
self::$name = $ini['global']['name'];
|
||||
self::$mail = $ini['global']['mail'];
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket