Make sure prototype is included from addExternal() as well,
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 31 Jul 2009 21:34:19 +0000 (17:34 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 31 Jul 2009 21:35:36 +0000 (17:35 -0400)
otherwise includeing an external script file before any other horde
file would cause prototype.js to not be loaded.

framework/Core/lib/Horde/Script/Files.php

index 934f9eb..aeb75cb 100644 (file)
@@ -90,6 +90,11 @@ class Horde_Script_Files
 
         $this->_included[$app][$url] = true;
 
+        // Always add prototype.js.
+        if (empty($this->_files) && ($file != 'prototype.js')) {
+            $this->add('prototype.js', 'horde', true);
+        }
+
         $this->_files[$app][] = array(
             'f' => basename($url),
             'u' => $url,