aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/tool
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2016-10-22 21:40:21 +0700
committerrxu <rxu@mail.ru>2016-10-23 00:57:37 +0700
commit0cc092073405166a0da72009823256a00389d0b8 (patch)
tree277a811c85935e4f61f162fed3a02df62b568a83 /phpBB/phpbb/db/migration/tool
parent05d0879795236e5fc4ae07145c0d7bcab05e5c15 (diff)
downloadforums-0cc092073405166a0da72009823256a00389d0b8.tar
forums-0cc092073405166a0da72009823256a00389d0b8.tar.gz
forums-0cc092073405166a0da72009823256a00389d0b8.tar.bz2
forums-0cc092073405166a0da72009823256a00389d0b8.tar.xz
forums-0cc092073405166a0da72009823256a00389d0b8.zip
[ticket/14831] Fix module migrator tool
PHPBB3-14831
Diffstat (limited to 'phpBB/phpbb/db/migration/tool')
-rw-r--r--phpBB/phpbb/db/migration/tool/module.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
index 6d5378e35f..d28d6153b9 100644
--- a/phpBB/phpbb/db/migration/tool/module.php
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -197,7 +197,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
if ($this->exists($class, $parent, $data['module_langname']))
{
- throw new \phpbb\db\migration\exception('MODULE_EXISTS', $module_id);
+ throw new \phpbb\db\migration\exception('MODULE_EXISTS', $data['module_langname']);
}
if (!class_exists('acp_modules'))
@@ -448,12 +448,11 @@ class module implements \phpbb\db\migration\tool\tool_interface
protected function get_categories_list()
{
// Select the top level categories
- // and 2nd level [sub]categories which exist for ACP only
+ // and 2nd level [sub]categories
$sql = 'SELECT m2.module_id, m2.module_langname
FROM ' . $this->modules_table . ' m1, ' . $this->modules_table . " m2
WHERE m1.parent_id = 0
- AND (m1.module_id = m2.module_id
- OR m2.module_class = 'acp' AND m2.parent_id = m1.module_id)
+ AND (m1.module_id = m2.module_id OR m2.parent_id = m1.module_id)
ORDER BY m1.module_id, m2.module_id ASC";
$result = $this->db->sql_query($sql);