From 08daa7ba84a97f41cf64632563f5eb1370ea4b09 Mon Sep 17 00:00:00 2001 From: boots Date: Tue, 9 May 2006 19:48:54 +0000 Subject: [PATCH] reverted {popup_init} as proposed change to insertion behviour was not BC --- NEWS | 1 - libs/plugins/function.popup_init.php | 26 +++++++++++--------------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index 4b9f497f..640f8b0e 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,3 @@ -- changed {popup_init} to only emit code once during a request (TGKnIght, boots) - fix handling of block-methods of registered objects (El Hombre Gris, messju) diff --git a/libs/plugins/function.popup_init.php b/libs/plugins/function.popup_init.php index a2206e0f..93cb4545 100644 --- a/libs/plugins/function.popup_init.php +++ b/libs/plugins/function.popup_init.php @@ -21,24 +21,20 @@ */ function smarty_function_popup_init($params, &$smarty) { - static $already_init; + $zindex = 1000; - if (!$already_init) { - $zindex = 1000; - - if (!empty($params['zindex'])) { - $zindex = $params['zindex']; - } - - if (!empty($params['src'])) { - return '' . "\n" - . '' . "\n"; - } else { - $smarty->trigger_error("popup_init: missing src parameter"); - } + if (!empty($params['zindex'])) { + $zindex = $params['zindex']; + } + + if (!empty($params['src'])) { + return '' . "\n" + . '' . "\n"; + } else { + $smarty->trigger_error("popup_init: missing src parameter"); } } /* vim: set expandtab: */ -?> \ No newline at end of file +?>