fix spacing/braces
parent
7f80b72371
commit
b6965a2c3f
|
@ -29,8 +29,7 @@ define( "ZM_DIR_TEMP", "@ZM_TMPDIR@" );
|
|||
|
||||
$configFile = ZM_CONFIG;
|
||||
$localConfigFile = basename($configFile);
|
||||
if ( file_exists( $localConfigFile ) && filesize( $localConfigFile ) > 0 )
|
||||
{
|
||||
if ( file_exists( $localConfigFile ) && filesize( $localConfigFile ) > 0 ) {
|
||||
if ( php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR']) )
|
||||
print( "Warning, overriding installed $localConfigFile file with local copy\n" );
|
||||
else
|
||||
|
@ -150,8 +149,7 @@ $GLOBALS['defaultUser'] = array(
|
|||
"MonitorIds" => false
|
||||
);
|
||||
|
||||
function loadConfig( $defineConsts=true )
|
||||
{
|
||||
function loadConfig( $defineConsts=true ) {
|
||||
global $config;
|
||||
global $configCats;
|
||||
global $dbConn;
|
||||
|
@ -163,13 +161,11 @@ function loadConfig( $defineConsts=true )
|
|||
if ( !$result )
|
||||
echo mysql_error();
|
||||
$monitors = array();
|
||||
while( $row = dbFetchNext( $result ) )
|
||||
{
|
||||
while( $row = dbFetchNext( $result ) ) {
|
||||
if ( $defineConsts )
|
||||
define( $row['Name'], $row['Value'] );
|
||||
$config[$row['Name']] = $row;
|
||||
if ( !($configCat = &$configCats[$row['Category']]) )
|
||||
{
|
||||
if ( !($configCat = &$configCats[$row['Category']]) ) {
|
||||
$configCats[$row['Category']] = array();
|
||||
$configCat = &$configCats[$row['Category']];
|
||||
}
|
||||
|
@ -204,8 +200,7 @@ function process_configfile($configFile) {
|
|||
$configvals = array();
|
||||
|
||||
$cfg = fopen( $configFile, "r") or die("Could not open config file.");
|
||||
while ( !feof($cfg) )
|
||||
{
|
||||
while ( !feof($cfg) ) {
|
||||
$str = fgets( $cfg, 256 );
|
||||
if ( preg_match( '/^\s*$/', $str ))
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue