From 60ef357beca7a6737ee46ae48103ee98b60fbb55 Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Tue, 11 Dec 2012 07:21:54 +0000 Subject: [PATCH] * code for task#978. --- module/install/control.php | 2 +- module/install/model.php | 11 ----------- module/install/view/step2.html.php | 4 ---- module/install/view/step3.html.php | 2 +- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/module/install/control.php b/module/install/control.php index cfda7b6c35..a5212c0354 100644 --- a/module/install/control.php +++ b/module/install/control.php @@ -23,7 +23,7 @@ class install extends control parent::__construct(); $this->app->loadLang('user'); $this->app->loadLang('admin'); - $this->config->webRoot = $this->install->getWebRoot(); + $this->config->webRoot = getWebRoot(); } /** diff --git a/module/install/model.php b/module/install/model.php index d3864c1b81..c712c4839d 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -202,17 +202,6 @@ class installModel extends model return $iniInfo; } - /** - * Get web root. - * - * @access public - * @return string - */ - public function getWebRoot() - { - return rtrim(str_replace('\\', '/', pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME)), '/') . '/'; - } - /** * Check config ok or not. * diff --git a/module/install/view/step2.html.php b/module/install/view/step2.html.php index d782b23903..31c7a623b0 100644 --- a/module/install/view/step2.html.php +++ b/module/install/view/step2.html.php @@ -18,10 +18,6 @@ install->key;?> install->value?> - - install->webRoot;?> - - install->requestType;?> install->requestTypes, 'GET', 'class=select-3');?> diff --git a/module/install/view/step3.html.php b/module/install/view/step3.html.php index 5b47d188e3..a1b72fefaa 100644 --- a/module/install/view/step3.html.php +++ b/module/install/view/step3.html.php @@ -24,7 +24,7 @@ if(!isset($error)) \$config->db->user = '$dbUser'; \$config->db->password = '$dbPassword'; \$config->db->prefix = '$dbPrefix'; -\$config->webRoot = '$webRoot'; +\$config->webRoot = getWebRoot(); \$config->default->domain = '$domain'; \$config->default->lang = '$defaultLang'; \$config->mysqldump = '';