1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-01 20:19:13 +02:00

[feature/extension-manager] Create an extension manager on update and install

It's required when adding modules

PHPBB3-10323
This commit is contained in:
Nils Adermann 2011-08-29 20:05:46 -04:00
parent 739e9eb58e
commit 48391d2dde
2 changed files with 14 additions and 2 deletions

View File

@ -678,7 +678,13 @@ function _write_result($no_updates, $errored, $error_ary)
function _add_modules($modules_to_install)
{
global $phpbb_root_path, $phpEx, $db;
global $phpbb_root_path, $phpEx, $db, $phpbb_extension_manager;
// modules require an extension manager
if (empty($phpbb_extension_manager))
{
$phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_root_path, ".$phpEx");
}
include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);

View File

@ -1483,7 +1483,13 @@ class install_install extends module
*/
function add_modules($mode, $sub)
{
global $db, $lang, $phpbb_root_path, $phpEx;
global $db, $lang, $phpbb_root_path, $phpEx, $phpbb_extension_manager;
// modules require an extension manager
if (empty($phpbb_extension_manager))
{
$phpbb_extension_manager = new phpbb_extension_manager($db, EXT_TABLE, $phpbb_root_path, ".$phpEx");
}
include_once($phpbb_root_path . 'includes/acp/acp_modules.' . $phpEx);