diff --git a/TODO b/TODO index e9e983a8..1019f2b7 100644 --- a/TODO +++ b/TODO @@ -9,3 +9,4 @@ * caching all but parts of the template * change plugins so $smarty variable always comes first * being able to load config files from PHP scripts +* get cache ttl with function call diff --git a/libs/plugins/function.eval.php b/libs/plugins/function.eval.php index bce9dc7f..c1d7a116 100644 --- a/libs/plugins/function.eval.php +++ b/libs/plugins/function.eval.php @@ -12,8 +12,8 @@ function smarty_function_eval($params, &$this) { extract($params); - if (empty($var)) { - $this->trigger_error("assign: missing 'var' parameter"); + if (!isset($var)) { + $this->trigger_error("eval: missing 'var' parameter"); return; } diff --git a/libs/plugins/function.popup_init.php b/libs/plugins/function.popup_init.php index c5d3cd44..d653d6df 100644 --- a/libs/plugins/function.popup_init.php +++ b/libs/plugins/function.popup_init.php @@ -10,8 +10,14 @@ */ function smarty_function_popup_init($params, &$smarty) { + $zindex = 1000; + + if (!empty($params['zindex'])) { + $zindex = $params['zindex']; + } + if (!empty($params['src'])) { - echo '
'."\n"; + echo ''."\n"; echo ''."\n"; } else { $smarty->trigger_error("popup_init: missing src parameter"); diff --git a/plugins/function.eval.php b/plugins/function.eval.php index bce9dc7f..c1d7a116 100644 --- a/plugins/function.eval.php +++ b/plugins/function.eval.php @@ -12,8 +12,8 @@ function smarty_function_eval($params, &$this) { extract($params); - if (empty($var)) { - $this->trigger_error("assign: missing 'var' parameter"); + if (!isset($var)) { + $this->trigger_error("eval: missing 'var' parameter"); return; } diff --git a/plugins/function.popup_init.php b/plugins/function.popup_init.php index c5d3cd44..d653d6df 100644 --- a/plugins/function.popup_init.php +++ b/plugins/function.popup_init.php @@ -10,8 +10,14 @@ */ function smarty_function_popup_init($params, &$smarty) { + $zindex = 1000; + + if (!empty($params['zindex'])) { + $zindex = $params['zindex']; + } + if (!empty($params['src'])) { - echo ''."\n"; + echo ''."\n"; echo ''."\n"; } else { $smarty->trigger_error("popup_init: missing src parameter");