From b917d285f2abdb38fe6d61c5b888762bd4623a45 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 3 Apr 2007 10:02:47 +0000 Subject: - fixed unnecessary check of MySQL if other database is selected in Wizard (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@3969 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/setup.inc.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'frontends/php/include/setup.inc.php') diff --git a/frontends/php/include/setup.inc.php b/frontends/php/include/setup.inc.php index bb125148..dd06cc32 100644 --- a/frontends/php/include/setup.inc.php +++ b/frontends/php/include/setup.inc.php @@ -58,7 +58,7 @@ parent::CForm(null, 'post'); } - function GetConfig($name, $default) + function GetConfig($name, $default = null) { return isset($this->ZBX_CONFIG[$name]) ? $this->ZBX_CONFIG[$name] : $default; } @@ -338,7 +338,7 @@ $table = new CTable(); $table->SetAlign('center'); - $DB_TYPE = $this->GetConfig('DB_TYPE', 'MYSQL'); + $DB_TYPE = $this->GetConfig('DB_TYPE'); $cmbType = new CComboBox('type', $DB_TYPE,'submit()'); foreach($ZBX_CONFIG['allowed_db'] as $id => $name) @@ -502,7 +502,9 @@ $old_DB_USER = $DB_USER; $old_DB_PASSWORD= $DB_PASSWORD; - $DB_TYPE = $this->GetConfig('DB_TYPE', 'MYSQL'); + $DB_TYPE = $this->GetConfig('DB_TYPE'); + if(is_null($DB_TYPE)) return false; + $DB_SERVER = $this->GetConfig('DB_SERVER', 'localhost'); $DB_DATABASE = $this->GetConfig('DB_DATABASE', 'zabbix'); $DB_USER = $this->GetConfig('DB_USER', 'root'); @@ -719,7 +721,7 @@ } if($this->GetStep() == 3) { - $this->SetConfig('DB_TYPE', get_request('type', $this->GetConfig('DB_TYPE', 'MYSQL'))); + $this->SetConfig('DB_TYPE', get_request('type', $this->GetConfig('DB_TYPE'))); $this->SetConfig('DB_SERVER', get_request('server', $this->GetConfig('DB_SERVER', 'localhost'))); $this->SetConfig('DB_DATABASE', get_request('database', $this->GetConfig('DB_DATABASE', 'zabbix'))); $this->SetConfig('DB_USER', get_request('user', $this->GetConfig('DB_USER', 'root'))); -- cgit