From: Michael M Slusarz Date: Tue, 27 Jul 2010 20:25:25 +0000 (-0600) Subject: Make sure Horde_Core_Ui_JsCalendar::init() is only run once. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c01ba6d1a87bd8e5da6c598efb37192a07bc7ea5;p=horde.git Make sure Horde_Core_Ui_JsCalendar::init() is only run once. --- 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