mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/13740] Fix is_phpbb_installed() method
PHPBB3-13740
This commit is contained in:
parent
fbd5929606
commit
e08f134112
2 changed files with 5 additions and 5 deletions
|
@ -111,7 +111,7 @@ class install
|
||||||
{
|
{
|
||||||
if ($this->install_helper->is_phpbb_installed())
|
if ($this->install_helper->is_phpbb_installed())
|
||||||
{
|
{
|
||||||
throw new http_exception(404, 'PAGE_NOT_FOUND');
|
die ('phpBB is already installed');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->template->assign_vars(array(
|
$this->template->assign_vars(array(
|
||||||
|
|
|
@ -47,14 +47,14 @@ class install_helper
|
||||||
*/
|
*/
|
||||||
public function is_phpbb_installed()
|
public function is_phpbb_installed()
|
||||||
{
|
{
|
||||||
$config_path = $this->phpbb_root_path . 'config' . $this->php_ext;
|
$config_path = $this->phpbb_root_path . 'config.' . $this->php_ext;
|
||||||
$install_lock_path = $this->phpbb_root_path . 'cache/install_lock';
|
$install_lock_path = $this->phpbb_root_path . 'cache/install_lock';
|
||||||
|
|
||||||
if (file_exists($config_path) && !file_exists($install_lock_path))
|
if (file_exists($config_path) && !file_exists($install_lock_path) && filesize($config_path))
|
||||||
{
|
{
|
||||||
include_once $config_path;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return defined('PHPBB_INSTALLED');
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue