diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-11-30 15:26:37 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-11-30 15:26:37 +0000 |
| commit | 81c87391ff94d185ec4c5fcc3ab7b9c2ae9d5f4d (patch) | |
| tree | fa131a8320cb17e199606b14406c697e62f3d28a /frontends/php/include/setup.inc.php | |
| parent | 0bb4c0bef168aa8b1f42d2f0794245e1a633d461 (diff) | |
| download | zabbix-81c87391ff94d185ec4c5fcc3ab7b9c2ae9d5f4d.tar.gz zabbix-81c87391ff94d185ec4c5fcc3ab7b9c2ae9d5f4d.tar.xz zabbix-81c87391ff94d185ec4c5fcc3ab7b9c2ae9d5f4d.zip | |
- fixed configuration file creation and reading (Eugene)
- removed database creation from installation scriop (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3548 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/setup.inc.php')
| -rw-r--r-- | frontends/php/include/setup.inc.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/frontends/php/include/setup.inc.php b/frontends/php/include/setup.inc.php index e12f838d..d829a28b 100644 --- a/frontends/php/include/setup.inc.php +++ b/frontends/php/include/setup.inc.php @@ -439,6 +439,7 @@ new CSpan(S_FAIL,'fail') )); + /* $table->AddRow(array('Table creation:', $this->GetConfig('ZBX_TABLES_CREATED', false) ? new CSpan(S_OK,'ok') : new CSpan(S_FAIL,'fail') @@ -448,6 +449,7 @@ new CSpan(S_OK,'ok') : new CSpan(S_FAIL,'fail') )); + */ return array( $table, BR, @@ -456,7 +458,7 @@ array('Please install configuration file manualy.',BR,BR, 'By pressing "Save configuration file" button download configuration file ', 'and place them into the ',BR, - '"'.(dirname($_SERVER['SCRIPT_FILENAME']).'/'.$ZBX_CONFIGURATION_FILE).'"',BR,BR, + '"'.realpath($ZBX_CONFIGURATION_FILE).'"',BR,BR, new CButton('save_config',"Save configuration file"), BR,BR ) @@ -499,6 +501,7 @@ return $result; } + /* function CreateTables() { global $ZBX_CONFIGURATION_FILE; @@ -540,7 +543,9 @@ return !isset($error); } + */ + /* function LoadData() { global $ZBX_CONFIGURATION_FILE; @@ -580,6 +585,7 @@ return !isset($error); } + */ function CheckConfigurationFile() { @@ -699,6 +705,7 @@ { $this->SetConfig('ZBX_CONFIG_FILE_CORRECT', $this->CheckConfigurationFile()); + /* if($this->GetConfig('ZBX_CONFIG_FILE_CORRECT', false) && !$this->GetConfig('ZBX_TABLES_CREATED', false)) { $this->SetConfig('ZBX_TABLES_CREATED', $this->CreateTables()); @@ -708,9 +715,10 @@ { $this->SetConfig('ZBX_DATA_LOADED', $this->LoadData()); } + */ - if(!$this->GetConfig('ZBX_TABLES_CREATED', false) || - !$this->GetConfig('ZBX_DATA_LOADED', false) || + if(/*!$this->GetConfig('ZBX_TABLES_CREATED', false) || + !$this->GetConfig('ZBX_DATA_LOADED', false) || */ !$this->GetConfig('ZBX_CONFIG_FILE_CORRECT', false)) { $this->DISABLE_NEXT_BUTTON = true; @@ -722,7 +730,7 @@ /* Make zabbix.conf.php downloadable */ header('Content-Type: application/x-httpd-php'); - header('Content-Disposition: attachment; filename="'.$ZBX_CONFIGURATION_FILE.'"'); + header('Content-Disposition: attachment; filename="'.basename($ZBX_CONFIGURATION_FILE).'"'); die( '<?php /* |
