mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #1553 from naderman/ticket/11690
[ticket/11690] Old module class names may get autoloaded by class_exists
This commit is contained in:
commit
47a611ab4f
1 changed files with 12 additions and 5 deletions
|
@ -575,13 +575,20 @@ class acp_modules
|
||||||
// format. phpbb_acp_info_acp_foo needs to be turned into
|
// format. phpbb_acp_info_acp_foo needs to be turned into
|
||||||
// acp_foo_info and the respective file has to be included
|
// acp_foo_info and the respective file has to be included
|
||||||
// manually because it does not support auto loading
|
// 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_file = str_replace("phpbb_{$module_class}_info_", '', $cur_module);
|
$info_class = $old_info_class;
|
||||||
$info_class = $info_class_file . '_info';
|
}
|
||||||
if (!class_exists($info_class) && file_exists($directory . $info_class_file . '.' . $phpEx))
|
else if (!class_exists($info_class))
|
||||||
|
{
|
||||||
|
$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue