mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Add the lock file to allow dynamic menus
git-svn-id: file:///svn/phpbb/trunk@6361 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6568ab756c
commit
227980c7d1
2 changed files with 15 additions and 4 deletions
|
@ -286,6 +286,10 @@ class module
|
||||||
}
|
}
|
||||||
|
|
||||||
$module = $this->filename;
|
$module = $this->filename;
|
||||||
|
if (!class_exists($module))
|
||||||
|
{
|
||||||
|
$this->error('Module not accessible', __LINE__, __FILE__);
|
||||||
|
}
|
||||||
$this->module = new $module($this);
|
$this->module = new $module($this);
|
||||||
|
|
||||||
if (method_exists($this->module, 'main'))
|
if (method_exists($this->module, 'main'))
|
||||||
|
|
|
@ -19,7 +19,7 @@ if ( !defined('IN_INSTALL') )
|
||||||
|
|
||||||
if (!empty($setmodules))
|
if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
/* If phpBB is already installed we do not include this module
|
// If phpBB is already installed we do not include this module
|
||||||
if (@file_exists($phpbb_root_path . 'config.' . $phpEx) && !file_exists($phpbb_root_path . 'cache/install_lock'))
|
if (@file_exists($phpbb_root_path . 'config.' . $phpEx) && !file_exists($phpbb_root_path . 'cache/install_lock'))
|
||||||
{
|
{
|
||||||
include_once($phpbb_root_path . 'config.' . $phpEx);
|
include_once($phpbb_root_path . 'config.' . $phpEx);
|
||||||
|
@ -28,7 +28,7 @@ if (!empty($setmodules))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
$module[] = array(
|
$module[] = array(
|
||||||
'module_type' => 'install',
|
'module_type' => 'install',
|
||||||
|
@ -54,7 +54,7 @@ class install_install extends module
|
||||||
|
|
||||||
function main($mode, $sub)
|
function main($mode, $sub)
|
||||||
{
|
{
|
||||||
global $lang, $template, $language;
|
global $lang, $template, $language, $phpbb_root_path;
|
||||||
|
|
||||||
switch ($sub)
|
switch ($sub)
|
||||||
{
|
{
|
||||||
|
@ -107,6 +107,9 @@ class install_install extends module
|
||||||
$this->add_bots($mode, $sub);
|
$this->add_bots($mode, $sub);
|
||||||
$this->email_admin($mode, $sub);
|
$this->email_admin($mode, $sub);
|
||||||
|
|
||||||
|
// Remove the lock file
|
||||||
|
@unlink($phpbb_root_path . 'cache/install_lock');
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -743,6 +746,10 @@ class install_install extends module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create a lock file to indicate that there is an install in progress
|
||||||
|
$fp = @fopen($phpbb_root_path . 'cache/install_lock', 'wb');
|
||||||
|
@fclose($fp);
|
||||||
|
|
||||||
$dbpasswd = html_entity_decode($dbpasswd);
|
$dbpasswd = html_entity_decode($dbpasswd);
|
||||||
$load_extensions = implode(',', $load_extensions);
|
$load_extensions = implode(',', $load_extensions);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue