diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-04-03 10:02:47 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-04-03 10:02:47 +0000 |
| commit | b917d285f2abdb38fe6d61c5b888762bd4623a45 (patch) | |
| tree | 060e1cfd47333bc30b899f4fdadfff2eae8536fd /frontends/php/include/setup.inc.php | |
| parent | e07100470bbd5fdf1f312fb9072c865866672f11 (diff) | |
| download | zabbix-b917d285f2abdb38fe6d61c5b888762bd4623a45.tar.gz zabbix-b917d285f2abdb38fe6d61c5b888762bd4623a45.tar.xz zabbix-b917d285f2abdb38fe6d61c5b888762bd4623a45.zip | |
- 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
Diffstat (limited to 'frontends/php/include/setup.inc.php')
| -rw-r--r-- | frontends/php/include/setup.inc.php | 10 |
1 files changed, 6 insertions, 4 deletions
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'))); |
