Skip to content

Instantly share code, notes, and snippets.

@nickvergessen
Last active December 24, 2015 02:29
Show Gist options
  • Save nickvergessen/6730959 to your computer and use it in GitHub Desktop.
Save nickvergessen/6730959 to your computer and use it in GitHub Desktop.
patch
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 6792886..100e330 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -565,7 +565,7 @@ class acp_modules
{
// Skip entries we do not need if we know the module we are
// looking for
- if ($module && strpos(str_replace('\\', '_', $cur_module), $module) === false)
+ if ($module && strpos(str_replace('\\', '_', $cur_module), $module) === false && $module !== $cur_module)
{
continue;
}
diff --git a/phpBB/phpbb/db/migration/tool/module.php b/phpBB/phpbb/db/migration/tool/module.php
index 9869dd4..3e39d87 100644
--- a/phpBB/phpbb/db/migration/tool/module.php
+++ b/phpBB/phpbb/db/migration/tool/module.php
@@ -182,9 +182,6 @@ class module implements \phpbb\db\migration\tool\tool_interface
{
// The "automatic" way
$basename = (isset($data['module_basename'])) ? $data['module_basename'] : '';
- $basename = str_replace(array('/', '\\'), '', $basename);
- $class = str_replace(array('/', '\\'), '', $class);
-
$module = $this->get_module_info($class, $basename);
$result = '';
@@ -353,9 +350,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
}
// Automatic method
- $basename = str_replace(array('/', '\\'), '', $module['module_basename']);
- $class = str_replace(array('/', '\\'), '', $class);
-
+ $basename = $module['module_basename'];
$module_info = $this->get_module_info($class, $basename);
foreach ($module_info['modes'] as $mode => $info)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment