Need to add popup localized text in here so it is always included, even if popup...
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 31 Jul 2009 21:14:44 +0000 (15:14 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 31 Jul 2009 21:56:43 +0000 (15:56 -0600)
framework/Core/lib/Horde.php
framework/Core/lib/Horde/Script/Files.php

index d20745d..7d479ec 100644 (file)
@@ -64,13 +64,6 @@ class Horde
     static protected $_inlineScript = array();
 
     /**
-     * Has popupJs been called?
-     *
-     * @var boolean
-     */
-    static protected $_popupjscalled = false;
-
-    /**
      * Logs a message to the global Horde log backend.
      *
      * @param mixed $message     Either a string or an object with a
@@ -2176,11 +2169,7 @@ HTML;
      */
     static public function popupJs($url, $options = array())
     {
-        if (!self::$_popupjscalled) {
-            Horde::addScriptFile('popup.js', 'horde', true);
-            Horde::addInlineScript('Horde.popup_block_text=' . Horde_Serialize::serialize(_("A popup window could not be opened. Your browser may be blocking popups."), Horde_Serialize::JSON), 'dom');
-            self::$_popupjscalled = true;
-        }
+        Horde::addScriptFile('popup.js', 'horde', true);
 
         $params = new stdClass;
         $pos = strpos($url, '?');
index 821ef83..6f77f6e 100644 (file)
@@ -125,6 +125,11 @@ class Horde_Script_Files
             $this->add('prototype.js', 'horde', true);
         }
 
+        // Add localized string for popup.js
+        if (($file == 'popup.js') && ($app = 'horde')) {
+            Horde::addInlineScript('Horde.popup_block_text=' . Horde_Serialize::serialize(_("A popup window could not be opened. Your browser may be blocking popups."), Horde_Serialize::JSON), 'dom');
+        }
+
         // Explicitly check for a directly serve-able version of the script.
         $path = $registry->get('fileroot', $app);
         if (!$direct &&