From 10c836228d8b281d4c06a89fa0ee61c7b810004b Mon Sep 17 00:00:00 2001 From: julmis Date: Sat, 1 Oct 2005 00:13:12 +0000 Subject: [PATCH] Merging from MOODLE_15_STABLE - added gz_handler for a bit faster page load. --- lib/editor/htmlarea.php | 9 ++++++++- lib/editor/lang/en.php | 4 ++++ lib/editor/popups/fullscreen.php | 15 ++++++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/lib/editor/htmlarea.php b/lib/editor/htmlarea.php index 549001c11abdf..7225beb0b2e8d 100644 --- a/lib/editor/htmlarea.php +++ b/lib/editor/htmlarea.php @@ -4,6 +4,10 @@ $lastmodified = filemtime("htmlarea.php"); $lifetime = 1800; + if ( function_exists('ob_gzhandler') ) { + ob_start("ob_gzhandler"); + } + header("Content-type: application/x-javascript"); // Correct MIME type header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT"); @@ -670,8 +674,11 @@ function createButton(txt) { // Generate iframe content var html = "" if (!editor.config.fullPage) { - html = "\n"; + html = '\n'; + html += "\n"; html += "\n"; + html += '" />\n'; if (editor.config.baseURL) html += ''; html += '\n"; diff --git a/lib/editor/lang/en.php b/lib/editor/lang/en.php index 4ebb9963506cf..eb83a0735f611 100644 --- a/lib/editor/lang/en.php +++ b/lib/editor/lang/en.php @@ -3,6 +3,10 @@ $lastmodified = filemtime("en.php"); $lifetime = 1800; + if ( function_exists('ob_gzhandler') ) { + ob_start("ob_gzhandler"); + } + header("Content-type: application/x-javascript"); // Correct MIME type header("Last-Modified: " . gmdate("D, d M Y H:i:s", $lastmodified) . " GMT"); header("Expires: " . gmdate("D, d M Y H:i:s", time() + $lifetime) . " GMT"); diff --git a/lib/editor/popups/fullscreen.php b/lib/editor/popups/fullscreen.php index b56a51903861c..46076314227d8 100644 --- a/lib/editor/popups/fullscreen.php +++ b/lib/editor/popups/fullscreen.php @@ -1,6 +1,11 @@ <?php print_string("fullscreen","editor");?> @@ -10,11 +15,11 @@ html, body { margin: 0px; border: 0px; background-color: buttonface; } - - - - - + + + + +