Permalink
Browse files

Merging from MOODLE_15_STABLE

- added gz_handler for a bit faster page load.
  • Loading branch information...
julmis
julmis committed Oct 1, 2005
1 parent 6957b7b commit 10c836228d8b281d4c06a89fa0ee61c7b810004b
Showing with 22 additions and 6 deletions.
  1. +8 −1 lib/editor/htmlarea.php
  2. +4 −0 lib/editor/lang/en.php
  3. +10 −5 lib/editor/popups/fullscreen.php
View
@@ -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 = "<html>\n";
+ html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ';
+ html += '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n';
+ html += "<html>\n";
html += "<head>\n";
+ html += '<meta http-equiv="content-type" content="text/html; charset=<?php print_string("thischarset");?>" />\n';
if (editor.config.baseURL)
html += '<base href="' + editor.config.baseURL + '" />';
html += '<style type="text/css">\n' + editor.config.pageStyle + "td { border: 1px dotted gray; }</style>\n";
View
@@ -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");
@@ -1,6 +1,11 @@
<?php // $Id$
include("../../../config.php");
$id = optional_param('id', 0, PARAM_INT);
+
+ if ( function_exists('ob_gzhandler') ) {
+ ob_start("ob_gzhandler");
+ }
+
?>
<html>
<head><title><?php print_string("fullscreen","editor");?></title>
@@ -10,11 +15,11 @@
html, body { margin: 0px; border: 0px; background-color: buttonface; } </style>
-<script type="text/javascript" src="../htmlarea.php?id=<?php p($id); ?>"></script>
-<script type="text/javascript" src="../lang/en.php"></script>
-<script type="text/javascript" src="../dialog.js"></script>
-<script type="text/javascript" src="../plugins/TableOperations/table-operations.js"></script>
-<script type="text/javascript" src="../plugins/TableOperations/lang/en.js"></script>
+<script type="text/javascript" src="../htmlarea.php?id=<?php p($id); ?>" charset="<?php print_string('thischarset'); ?>"></script>
+<script type="text/javascript" src="../lang/en.php" charset="<?php print_string('thischarset'); ?>"></script>
+<script type="text/javascript" src="../dialog.js" charset="<?php print_string('thischarset'); ?>"></script>
+<script type="text/javascript" src="../plugins/TableOperations/table-operations.js" charset="<?php print_string('thischarset'); ?>"></script>
+<script type="text/javascript" src="../plugins/TableOperations/lang/en.js" charset="<?php print_string('thischarset'); ?>"></script>
<script type="text/javascript">
// load same scripts that were present in the opener page
var scripts = opener.document.getElementsByTagName("script");

0 comments on commit 10c8362

Please sign in to comment.