[ticket/13740] Fix is_phpbb_installed() method

PHPBB3-13740
This commit is contained in:
Mate Bartus 2015-07-23 22:55:31 +02:00
parent fbd5929606
commit e08f134112
2 changed files with 5 additions and 5 deletions

View file

@ -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(

View file

@ -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;
} }
} }