Merge branch 'improve_filter' into storageareas

This commit is contained in:
Isaac Connor committed 2016-05-27 09:57:05 -04:00
commit d52a6f9a95
5 files changed
+364 -438

No files matched your search

+3 -3
View File
@@ -135,9 +135,9 @@ function loadConfigFile() {
elseif ( preg_match( '/^\s*#/', $str ))
continue;
elseif ( preg_match( '/^\s*([^=\s]+)\s*=\s*(.*?)\s*$/', $str, $matches )) {
Configure::write("$matches[1]", "$matches[2]");
define( $matches[1], $matches[2] );
}
Configure::write( $matches[1], $matches[2] );
define( $matches[1], $matches[2] );
}
}
fclose( $cfg );
}
+14
View File
@@ -85,4 +85,18 @@ class DATABASE_CONFIG {
'prefix' => '',
//'encoding' => 'utf8',
);
public function __construct() {
if (strpos(ZM_DB_HOST, ':')):
$array = explode(':', ZM_DB_HOST, 2);
if (is_numeric($array[1])):
$this->default['host'] = $array[0];
$this->default['port'] = $array[1];
else:
$this->default['unix_socket'] = $array[1];
endif;
else:
$this->default['host'] = ZM_DB_HOST;
endif;
}
}