* code for task#978.

This commit is contained in:
zhujinyong
2012-12-11 07:21:54 +00:00
parent 506f9bc72f
commit 60ef357bec
4 changed files with 2 additions and 17 deletions

View File

@@ -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();
}
/**

View File

@@ -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.
*

View File

@@ -18,10 +18,6 @@
<th class='w-p20'><?php echo $lang->install->key;?></th>
<th class='a-left'><?php echo $lang->install->value?></th>
</tr>
<tr>
<th><?php echo $lang->install->webRoot;?></th>
<td><?php echo html::input('webRoot', $webRoot, 'class=text-3');?></td>
</tr>
<tr>
<th><?php echo $lang->install->requestType;?></th>
<td><?php echo html::select('requestType', $lang->install->requestTypes, 'GET', 'class=select-3');?></td>

View File

@@ -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 = '';