Merging from MOODLE_15_STABLE

- added gz_handler for a bit faster page load.
This commit is contained in:
julmis
2005-10-01 00:13:12 +00:00
parent 6957b7bc59
commit 10c836228d
3 changed files with 22 additions and 6 deletions
+8 -1
View File
@@ -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 @@ HTMLArea.prototype.generate = function () {
// 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";
+4
View File
@@ -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");
+10 -5
View File
@@ -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");