diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2013-09-27 18:14:58 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2013-09-27 18:14:58 +0200 |
| commit | e0adb15074cf7f6776af29376ed205d8d4948949 (patch) | |
| tree | c3db6f9bd91d44b8b7c42665ab87c7b06d525fd6 | |
| parent | 08b49203b48dc0bf3e1d851776288483065cf399 (diff) | |
| download | forums-e0adb15074cf7f6776af29376ed205d8d4948949.tar forums-e0adb15074cf7f6776af29376ed205d8d4948949.tar.gz forums-e0adb15074cf7f6776af29376ed205d8d4948949.tar.bz2 forums-e0adb15074cf7f6776af29376ed205d8d4948949.tar.xz forums-e0adb15074cf7f6776af29376ed205d8d4948949.zip | |
[ticket/11871] Allow backslash in classnames for Modules
PHPBB3-11871
| -rw-r--r-- | phpBB/includes/acp/acp_modules.php | 2 | ||||
| -rw-r--r-- | phpBB/phpbb/db/migration/tool/module.php | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index 6792886d2a..100e33044b 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 9869dd4230..3e39d87c04 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) |
