aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration/tool/module.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2016-07-03 01:26:42 +0700
committerrxu <rxu@mail.ru>2016-07-03 01:31:42 +0700
commit2f53761eaf8fd6991a7af4e31c8ecefe30013cab (patch)
treedb9ed6d29d17c28a7405ee0e326a6ff856d2f03e /phpBB/phpbb/db/migration/tool/module.php
parent9595946508c198be3aaae6deb88dee2bba354aef (diff)
downloadforums-2f53761eaf8fd6991a7af4e31c8ecefe30013cab.tar
forums-2f53761eaf8fd6991a7af4e31c8ecefe30013cab.tar.gz
forums-2f53761eaf8fd6991a7af4e31c8ecefe30013cab.tar.bz2
forums-2f53761eaf8fd6991a7af4e31c8ecefe30013cab.tar.xz
forums-2f53761eaf8fd6991a7af4e31c8ecefe30013cab.zip
[ticket/14703] Fix parent module selection for custom extension modules
PHPBB3-14703
Diffstat (limited to 'phpBB/phpbb/db/migration/tool/module.php')
-rw-r--r--phpBB/phpbb/db/migration/tool/module.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
index 035625b095..d01b659a0e 100644
--- a/phpBB/phpbb/db/migration/tool/module.php
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -210,12 +210,15 @@ class module implements \phpbb\db\migration\tool\tool_interface
}
// The "manual" way
+ // More than 1 module with the same module_basename may exist
+ // Thus use empty module_basename to select a category as a parent
if (!is_numeric($parent))
{
$sql = 'SELECT module_id
FROM ' . $this->modules_table . "
WHERE module_langname = '" . $this->db->sql_escape($parent) . "'
- AND module_class = '" . $this->db->sql_escape($class) . "'";
+ AND module_class = '" . $this->db->sql_escape($class) . "'
+ AND module_basename = ''";
$result = $this->db->sql_query($sql);
$module_id = $this->db->sql_fetchfield('module_id');
$this->db->sql_freeresult($result);