Revision: 2341
http://mrbs.svn.sourceforge.net/mrbs/?rev=2341&view=rev
Author: cimorrison
Date: 2012-07-19 08:13:23 +0000 (Thu, 19 Jul 2012)
Log Message:
-----------
Moved the HTTP header generation into a function
Modified Paths:
--------------
mrbs/trunk/web/Themes/default/header.inc
mrbs/trunk/web/functions.inc
Modified: mrbs/trunk/web/Themes/default/header.inc
===================================================================
--- mrbs/trunk/web/Themes/default/header.inc 2012-07-19 06:57:38 UTC (rev
2340)
+++ mrbs/trunk/web/Themes/default/header.inc 2012-07-19 08:13:23 UTC (rev
2341)
@@ -44,12 +44,7 @@
$search_str = "";
}
- header("Content-Type: text/html; charset=" . get_charset());
- // We want to prevent IE8 offering "Compatability View" as that really
- // messes up MRBS, especially on the Report page
- header("X-UA-Compatible: IE=Edge");
- header("Pragma: no-cache"); // HTTP 1.0
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
+ http_headers();
echo DOCTYPE;
?>
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2012-07-19 06:57:38 UTC (rev 2340)
+++ mrbs/trunk/web/functions.inc 2012-07-19 08:13:23 UTC (rev 2341)
@@ -80,6 +80,19 @@
$done_header = FALSE;
+
+// Outputs the HTTP headers
+function http_headers()
+{
+ header("Content-Type: text/html; charset=" . get_charset());
+ // We want to prevent IE8 offering "Compatability View" as that really
+ // messes up MRBS, especially on the Report page
+ header("X-UA-Compatible: IE=Edge");
+ header("Pragma: no-cache"); // HTTP 1.0
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the pastt
+}
+
+
// Prints a very simple header. This may be necessary on occasions, such as
// during a database upgrade, when some of the features that the normal
// header uses are not yet available.
@@ -92,10 +105,7 @@
return;
}
- header("Content-Type: text/html; charset=" . get_charset());
- header("X-UA-Compatible: IE=Edge");
- header("Pragma: no-cache"); // HTTP 1.0
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
+ http_headers();
echo DOCTYPE;
?>
@@ -111,6 +121,7 @@
$done_header = TRUE;
}
+
// Print the page header
function print_header($day, $month, $year, $area, $room)
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits