From f406eb0dd8e035a028025d3c2fff22758f8a8c52 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Thu, 16 Dec 2010 18:44:08 -0500 Subject: [PATCH] If we include a full url, output prototype with a full url as well. explicitly including prototype withOUT a full url breaks all kinds of stuff with API rendering and external site embedding. --- framework/Core/lib/Horde/Script/Files.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework/Core/lib/Horde/Script/Files.php b/framework/Core/lib/Horde/Script/Files.php index e9c3268e2..197e675b2 100644 --- a/framework/Core/lib/Horde/Script/Files.php +++ b/framework/Core/lib/Horde/Script/Files.php @@ -22,6 +22,8 @@ class Horde_Script_Files */ public $prototypejs = true; + protected $_full = false; + /** * The list of script files to add. * @@ -49,6 +51,9 @@ class Horde_Script_Files */ public function add($file, $app = null, $full = false) { + if ($full && !$this->_full) { + $this->_full = true; + } if (($this->_add($file, $app, $full) === false) || !Horde::contentSent()) { return; @@ -170,7 +175,7 @@ class Horde_Script_Files if (!isset($this->_included['horde']['prototype.js'])) { $old = $this->_files['horde']; $this->_files['horde'] = array(); - $this->_add('prototype.js', 'horde', false); + $this->_add('prototype.js', 'horde', $this->_full); $this->_files['horde'] = array_merge($this->_files['horde'], $old); } -- 2.11.0