aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-08-05 22:24:15 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-08-05 22:51:22 +0200
commit48a8482d23d7ab6fb0ef4c14f3d8464a78c14477 (patch)
tree49d905a6f14ef4fdcd5205209d366d85f4f3bc6b /phpBB
parenta326dc10cf2aa6f0ec631cbb23625831002da2ff (diff)
downloadforums-48a8482d23d7ab6fb0ef4c14f3d8464a78c14477.tar
forums-48a8482d23d7ab6fb0ef4c14f3d8464a78c14477.tar.gz
forums-48a8482d23d7ab6fb0ef4c14f3d8464a78c14477.tar.bz2
forums-48a8482d23d7ab6fb0ef4c14f3d8464a78c14477.tar.xz
forums-48a8482d23d7ab6fb0ef4c14f3d8464a78c14477.zip
[feature/php-events] Fix docs and naming of core.build_config_template
PHPBB3-9550
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_acp.php22
1 files changed, 18 insertions, 4 deletions
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php
index 8ee506377d..23517f23aa 100644
--- a/phpBB/includes/functions_acp.php
+++ b/phpBB/includes/functions_acp.php
@@ -234,8 +234,7 @@ function h_radio($name, $input_ary, $input_default = false, $id = false, $key =
*/
function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
{
- global $user, $module;
- global $phpbb_dispatcher;
+ global $user, $module, $phpbb_dispatcher;
$tpl = '';
$name = 'config[' . $config_key . ']';
@@ -347,8 +346,23 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
$tpl .= $vars['append'];
}
- $vars = array('tpl_type', 'key', 'new', 'config_key', 'vars', 'tpl');
- extract($phpbb_dispatcher->trigger_event('core.build_cfg_template', compact($vars)));
+ /**
+ * Overwrite the html code we display for the config value
+ *
+ * @event core.build_config_template
+ * @var array tpl_type Config type array:
+ * 0 => data type
+ * 1 [optional] => string: size, int: minimum
+ * 2 [optional] => string: max. length, int: maximum
+ * @var string key Should be used for the id attribute in html
+ * @var array new Array with the config values we display
+ * @var string name Should be used for the name attribute
+ * @var array vars Array with the options for the config
+ * @var string tpl The resulting html code we display
+ * @since 3.1-A1
+ */
+ $vars = array('tpl_type', 'key', 'new', 'name', 'vars', 'tpl');
+ extract($phpbb_dispatcher->trigger_event('core.build_config_template', compact($vars)));
return $tpl;
}