1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 22:40:39 +02:00

[ticket/12612] Prefix module url functions with phpbb_

PHPBB3-12612
This commit is contained in:
Joas Schilling
2014-06-23 22:54:15 +02:00
parent e4437e19e8
commit bba23f61b3
4 changed files with 31 additions and 27 deletions

View File

@@ -250,13 +250,25 @@ class p_master
// Function for building 'url_extra'
$short_name = $this->get_short_name($row['module_basename']);
$url_func = '_module_' . $short_name . '_url';
$url_func = 'phpbb_module_' . $short_name . '_url';
if (!function_exists($url_func))
{
$url_func = '_module_' . $short_name . '_url';
}
// Function for building the language name
$lang_func = '_module_' . $short_name . '_lang';
$lang_func = 'phpbb_module_' . $short_name . '_lang';
if (!function_exists($lang_func))
{
$lang_func = '_module_' . $short_name . '_lang';
}
// Custom function for calling parameters on module init (for example assigning template variables)
$custom_func = 'phpbb_module_' . $short_name;
if (!function_exists($custom_func))
{
$custom_func = '_module_' . $short_name;
}
$names[$row['module_basename'] . '_' . $row['module_mode']][] = true;
@@ -286,14 +298,6 @@ class p_master
{
$custom_func($row['module_mode'], $module_row);
}
else
{
$custom_func = '_module_' . $short_name;
if (function_exists($custom_func))
{
$custom_func($row['module_mode'], $module_row);
}
}
/**
* This event allows to modify parameters for building modules list