diff --git a/gosa-core/include/smarty/plugins/function.html_checkboxes.php b/gosa-core/include/smarty/plugins/function.html_checkboxes.php
index ed8ad7f33db888b4dad1d50847e865b1389e9117..ac72f3fdf3f14f1266d555e468508433cd385f9b 100644 (file)
/**
* Smarty plugin
* @package Smarty
- * @subpackage plugins
+ * @subpackage PluginsFunction
*/
* Name: html_checkboxes<br>
* Date: 24.Feb.2003<br>
* Purpose: Prints out a list of checkbox input types<br>
- * Input:<br>
- * - name (optional) - string default "checkbox"
- * - values (required) - array
- * - options (optional) - associative array
- * - checked (optional) - array default not set
- * - separator (optional) - ie <br> or
- * - output (optional) - the output next to each checkbox
- * - assign (optional) - assign the output as an array to this variable
* Examples:
* <pre>
* {html_checkboxes values=$ids output=$names}
* @author Christopher Kvarme <christopher.kvarme@flashjab.com>
* @author credits to Monte Ohrt <monte at ohrt dot com>
* @version 1.0
- * @param array
- * @param Smarty
+ * @param array $params parameters
+ * Input:<br>
+ * - name (optional) - string default "checkbox"
+ * - values (required) - array
+ * - options (optional) - associative array
+ * - checked (optional) - array default not set
+ * - separator (optional) - ie <br> or
+ * - output (optional) - the output next to each checkbox
+ * - assign (optional) - assign the output as an array to this variable
+ * @param object $smarty Smarty object
+ * @param object $template template object
* @return string
* @uses smarty_function_escape_special_chars()
*/
-function smarty_function_html_checkboxes($params, &$smarty)
+function smarty_function_html_checkboxes($params, $smarty, $template)
{
- require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+ //$smarty->loadPlugin('Smarty_shared_escape_special_chars');
$name = 'checkbox';
$values = null;
break;
case 'checkboxes':
- $smarty->trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);
$options = (array)$_val;
break;
if(!is_array($_val)) {
$extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
} else {
- $smarty->trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
}
break;
}
}
if(!empty($params['assign'])) {
- $smarty->assign($params['assign'], $_html_result);
+ $template->assign($params['assign'], $_html_result);
} else {
return implode("\n",$_html_result);
}