summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/setup.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-11 11:23:36 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-05-11 11:23:36 +0000
commit8c85e6829a61149b9c2178323c91575d6a285162 (patch)
treefc803aff4ce66a5ce0bfa3532724e362a5d33ad3 /frontends/php/include/setup.inc.php
parenta3a4c01ef782952e749bd8e5116a0b4aa54143f3 (diff)
downloadzabbix-8c85e6829a61149b9c2178323c91575d6a285162.tar.gz
zabbix-8c85e6829a61149b9c2178323c91575d6a285162.tar.xz
zabbix-8c85e6829a61149b9c2178323c91575d6a285162.zip
- added availability to yse '\!' characters in item keys (Eugene)
- added code documentation - fixed fopen error for installation screen git-svn-id: svn://svn.zabbix.com/trunk@4123 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/setup.inc.php')
-rw-r--r--frontends/php/include/setup.inc.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/frontends/php/include/setup.inc.php b/frontends/php/include/setup.inc.php
index 2b0f7d37..84c01b9d 100644
--- a/frontends/php/include/setup.inc.php
+++ b/frontends/php/include/setup.inc.php
@@ -431,8 +431,9 @@
{
global $_SERVER, $ZBX_CONFIGURATION_FILE;
+ show_messages();
/* Write the new contents */
- if($f = fopen($ZBX_CONFIGURATION_FILE, 'w'))
+ if($f = @fopen($ZBX_CONFIGURATION_FILE, 'w'))
{
if(fwrite($f, $this->GetNewConfigurationFileContent()))
{
@@ -440,12 +441,12 @@
{
if($this->SetConfig('ZBX_CONFIG_FILE_CORRECT', $this->CheckConfigurationFile()))
{
- clear_messages();
$this->DISABLE_NEXT_BUTTON = false;
}
}
}
}
+ clear_messages(); /* don't show errors */
$table = new CTable(null, 'requirements');
$table->SetAlign('center');
@@ -642,6 +643,7 @@
$old_DB_PASSWORD= $DB_PASSWORD;
$error = null;
+ $error_msg = null;
global $ZBX_CONFIGURATION_FILE;
@@ -661,14 +663,14 @@
$DB_USER == $this->GetConfig('DB_USER', null) &&
$DB_PASSWORD == $this->GetConfig('DB_PASSWORD', null))
{
- if(!DBconnect($error))
+ if(!DBconnect($error_msg))
{
- $error = 'Can not connect to database';
+ $error_msg = 'Can not connect to database';
}
}
else
{
- $error = 'Incorrect configuration file['.$ZBX_CONFIGURATION_FILE.']';
+ $error_msg = 'Incorrect configuration file['.$ZBX_CONFIGURATION_FILE.']';
}
DBclose();
}
@@ -677,9 +679,9 @@
$error = 'Missing configuration file['.$ZBX_CONFIGURATION_FILE.']';
}
- if(isset($error))
+ if(isset($error_msg))
{
- error($error);
+ error($error_msg);
}
/* restore connection */
@@ -694,7 +696,7 @@
DBconnect($error2);
- return !isset($error);
+ return !isset($error)&&!isset($error_msg);
}
function EventHandler()