Skip to content

Commit

Permalink
Merging from MOODLE_15_STABLE
Browse files Browse the repository at this point in the history
- added gz_handler for a bit faster page load.
  • Loading branch information
julmis committed Oct 1, 2005
1 parent 6957b7b commit 10c8362
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
9 changes: 8 additions & 1 deletion lib/editor/htmlarea.php
Expand Up @@ -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");
Expand Down Expand Up @@ -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";
Expand Down
4 changes: 4 additions & 0 deletions lib/editor/lang/en.php
Expand Up @@ -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");
Expand Down
15 changes: 10 additions & 5 deletions lib/editor/popups/fullscreen.php
@@ -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>
Expand All @@ -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");
Expand Down

0 comments on commit 10c8362

Please sign in to comment.