aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/db/migration
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2018-03-26 20:22:16 +0200
committerMarc Alexander <admin@m-a-styles.de>2018-03-26 20:22:16 +0200
commit364407ab59a1324b2638549436b02fd313ddceda (patch)
tree7005841b490975f17da95f618f7514f3c12e4cf5 /phpBB/phpbb/db/migration
parent1c30a9778ddc808d188492466da5a08a10a00240 (diff)
parentd7db5d366b9a326237efc7576d7db3215a51bc81 (diff)
downloadforums-364407ab59a1324b2638549436b02fd313ddceda.tar
forums-364407ab59a1324b2638549436b02fd313ddceda.tar.gz
forums-364407ab59a1324b2638549436b02fd313ddceda.tar.bz2
forums-364407ab59a1324b2638549436b02fd313ddceda.tar.xz
forums-364407ab59a1324b2638549436b02fd313ddceda.zip
Merge pull request #5163 from VSEphpbb/ticket/15595
[ticket/15595] Fix module exists tool when ignoring parent check
Diffstat (limited to 'phpBB/phpbb/db/migration')
-rw-r--r--phpBB/phpbb/db/migration/tool/module.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
index 7d2720c861..e24c78e228 100644
--- a/phpBB/phpbb/db/migration/tool/module.php
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -86,7 +86,8 @@ class module implements \phpbb\db\migration\tool\tool_interface
* check for to see if it exists
* @param bool $lazy Checks lazily if the module exists. Returns true if it exists in at
* least one given parent.
- * @return bool true if module exists in *all* given parents, false if not
+ * @return bool true if module exists in *all* given parents, false if not in any given parent;
+ * true if ignoring parent check and module exists class wide, false if not found at all.
*/
public function exists($class, $parent, $module, $lazy = false)
{
@@ -110,6 +111,10 @@ class module implements \phpbb\db\migration\tool\tool_interface
$parent_sqls[] = 'AND parent_id = ' . (int) $parent_id;
}
}
+ else
+ {
+ $parent_sqls[] = '';
+ }
foreach ($parent_sqls as $parent_sql)
{
@@ -126,7 +131,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
{
return false;
}
- else if ($lazy && $module_id)
+ if ($lazy && $module_id)
{
return true;
}