aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2018-03-19 16:42:53 -0700
committerMatt Friedman <maf675@gmail.com>2018-03-19 16:45:44 -0700
commitd7db5d366b9a326237efc7576d7db3215a51bc81 (patch)
treee532870f0cdb72c4dac29c8bc8cf5f3f400d383c /phpBB
parent17c3bf0b39210f3c7519d4e652e431dbe38151d5 (diff)
downloadforums-d7db5d366b9a326237efc7576d7db3215a51bc81.tar
forums-d7db5d366b9a326237efc7576d7db3215a51bc81.tar.gz
forums-d7db5d366b9a326237efc7576d7db3215a51bc81.tar.bz2
forums-d7db5d366b9a326237efc7576d7db3215a51bc81.tar.xz
forums-d7db5d366b9a326237efc7576d7db3215a51bc81.zip
[ticket/15595] Fix module exists tool when parent is false
PHPBB3-15595
Diffstat (limited to 'phpBB')
-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;
}