diff options
author | David King <imkingdavid@gmail.com> | 2013-07-13 21:09:48 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2013-07-13 21:09:48 -0400 |
commit | e7b725369e962960943483d367f309be1cf45a69 (patch) | |
tree | 2d287d1eb756848f5c7c961f49c9329df77aa830 /phpBB/includes/acp/acp_modules.php | |
parent | dfe0f6b1439ba13d433a2290a10450405428d3ef (diff) | |
parent | 71f6f5ad7e095ded7bcad449e0bcd646ac610117 (diff) | |
download | forums-e7b725369e962960943483d367f309be1cf45a69.tar forums-e7b725369e962960943483d367f309be1cf45a69.tar.gz forums-e7b725369e962960943483d367f309be1cf45a69.tar.bz2 forums-e7b725369e962960943483d367f309be1cf45a69.tar.xz forums-e7b725369e962960943483d367f309be1cf45a69.zip |
Merge branch 'develop' into ticket/11215
* develop:
[ticket/11675] Fix template loop
[ticket/11690] Old module class names may get autoloaded by class_exists
[ticket/9649] Display information on index for moderators on unapproved posts
[ticket/11686] Not checking for phpBB Debug errors on functional tests
[ticket/11553] Typo
[ticket/11553] Replace bullet with unicode
[ticket/11553] Move bulletin points to pseudo class
[ticket/11600] Remove duplicate test case
[ticket/11600] Use lowercase null and remove duplicate test cases
[ticket/11600] Use local variable for $user in test_localize_errors
[ŧicket/11600] Split get driver tests into tests for all and only enabled ones
[ticket/11600] Increase code test coverage of avatar manager
Diffstat (limited to 'phpBB/includes/acp/acp_modules.php')
-rw-r--r-- | phpBB/includes/acp/acp_modules.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index ab416fb406..a1e681b29c 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -575,13 +575,20 @@ class acp_modules // format. phpbb_acp_info_acp_foo needs to be turned into // acp_foo_info and the respective file has to be included // manually because it does not support auto loading - if (!class_exists($info_class)) + $old_info_class_file = str_replace("phpbb_{$module_class}_info_", '', $cur_module); + $old_info_class = $old_info_class_file . '_info'; + + if (class_exists($old_info_class)) + { + $info_class = $old_info_class; + } + else if (!class_exists($info_class)) { - $info_class_file = str_replace("phpbb_{$module_class}_info_", '', $cur_module); - $info_class = $info_class_file . '_info'; - if (!class_exists($info_class) && file_exists($directory . $info_class_file . '.' . $phpEx)) + $info_class = $old_info_class; + // need to check class exists again because previous checks triggered autoloading + if (!class_exists($info_class) && file_exists($directory . $old_info_class_file . '.' . $phpEx)) { - include($directory . $info_class_file . '.' . $phpEx); + include($directory . $old_info_class_file . '.' . $phpEx); } } |