mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/13777] Use module manager in phpBB core files
PHPBB3-13777
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class acp_prune_users_module extends \phpbb\db\migration\migration
|
||||
class acp_prune_users_module extends \phpbb\db\migration\container_aware_migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -70,12 +70,7 @@ class acp_prune_users_module extends \phpbb\db\migration\migration
|
||||
$acp_cat_users_id = (int) $this->db->sql_fetchfield('module_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
if (!class_exists('\acp_modules'))
|
||||
{
|
||||
include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
|
||||
}
|
||||
$module_manager = new \acp_modules();
|
||||
$module_manager->module_class = 'acp';
|
||||
$module_manager->move_module($acp_prune_users_id, $acp_cat_users_id);
|
||||
$module_manager = $this->container->get('module.manager');
|
||||
$module_manager->move_module($acp_prune_users_id, $acp_cat_users_id, 'acp');
|
||||
}
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace phpbb\db\migration\data\v310;
|
||||
|
||||
class dev extends \phpbb\db\migration\migration
|
||||
class dev extends \phpbb\db\migration\container_aware_migration
|
||||
{
|
||||
public function effectively_installed()
|
||||
{
|
||||
@@ -204,18 +204,13 @@ class dev extends \phpbb\db\migration\migration
|
||||
$language_management_module_id = $this->db->sql_fetchfield('module_id');
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
if (!class_exists('acp_modules'))
|
||||
{
|
||||
include($this->phpbb_root_path . 'includes/acp/acp_modules.' . $this->php_ext);
|
||||
}
|
||||
// acp_modules calls adm_back_link, which is undefined at this point
|
||||
if (!function_exists('adm_back_link'))
|
||||
{
|
||||
include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext);
|
||||
}
|
||||
$module_manager = new \acp_modules();
|
||||
$module_manager->module_class = 'acp';
|
||||
$module_manager->move_module($language_module_id, $language_management_module_id);
|
||||
$module_manager = $this->container->get('module.manager');
|
||||
$module_manager->move_module($language_module_id, $language_management_module_id, 'acp');
|
||||
}
|
||||
|
||||
public function update_ucp_pm_basename()
|
||||
|
Reference in New Issue
Block a user