From c01ba6d1a87bd8e5da6c598efb37192a07bc7ea5 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 27 Jul 2010 14:25:25 -0600 Subject: [PATCH] Make sure Horde_Core_Ui_JsCalendar::init() is only run once. --- framework/Core/lib/Horde/Core/Ui/JsCalendar.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/framework/Core/lib/Horde/Core/Ui/JsCalendar.php b/framework/Core/lib/Horde/Core/Ui/JsCalendar.php index e694622bd..0212519a5 100644 --- a/framework/Core/lib/Horde/Core/Ui/JsCalendar.php +++ b/framework/Core/lib/Horde/Core/Ui/JsCalendar.php @@ -16,6 +16,13 @@ class Horde_Core_Ui_JsCalendar { /** + * Make sure init() is only run once. + * + * @var boolean + */ + static protected $_initRun = false; + + /** * Output the necessary javascript code to allow display of the calendar * widget. * @@ -31,6 +38,11 @@ class Horde_Core_Ui_JsCalendar */ static public function init(array $params = array()) { + if (self::$_initRun) { + return; + } + self::$_initRun = true; + $params = array_merge(array( 'full_weekdays' => false, 'short_weekdays' => false -- 2.11.0