Permalink
Browse files

Merged $bodytags parameter in headers from STABLE

  • Loading branch information...
1 parent dca5ac2 commit 63f3cbbd7d80bc3c5ca1ae30ae88c94097cd38b9 moodler committed Jul 14, 2004
View
@@ -516,7 +516,7 @@ function validate_email ($address) {
}
function detect_munged_arguments($string) {
- if (ereg('\.\.', $string)) { // check for parent URLs
+ if (substr_count($string, '..') > 1) { // We allow one '..' in a URL
return true;
}
if (ereg('[\|\`]', $string)) { // check for other bad characters
@@ -927,7 +927,7 @@ function highlightfast($needle, $haystack) {
/// STANDARD WEB PAGE PARTS ///////////////////////////////////////////////////
function print_header ($title="", $heading="", $navigation="", $focus="", $meta="",
- $cache=true, $button=" ", $menu="", $usexml=false) {
+ $cache=true, $button=" ", $menu="", $usexml=false, $bodytags="") {
// $title - appears top of window
// $heading - appears top of page
// $navigation - premade navigation string
@@ -937,6 +937,8 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta=
// $button - HTML code for a button (usually for module editing)
// $menu - HTML code for a popup menu
// $usexml - use XML for this page
+// $bodytags - this text will be included verbatim in the <body> tag (useful for onload() etc)
+
global $USER, $CFG, $THEME, $SESSION;
global $course; // This is a bit of an ugly hack to be gotten rid of later
View
@@ -258,3 +258,10 @@ TD.cal_event_description { }
A IMG { }
TABLE.formtable TD { }
+
+================================
+Changes from 1.3.2 - 1.3.3
+--------------------------------
+
+$bodytags variable is now included in header.html (important for SCORM)
+
@@ -10,6 +10,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -9,6 +9,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -9,12 +9,13 @@
<?php include("$CFG->javascript"); ?>
</head>
-<body bgcolor="#006699">
-<table align="center" width="100%" border="1" cellpadding="5" bgcolor="#739fc4" <?php
+<body bgcolor="#006699" <?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
?>>
+<table align="center" width="100%" border="1" cellpadding="5" bgcolor="#739fc4">
<td>
@@ -9,6 +9,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
View
@@ -10,6 +10,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
View
@@ -9,6 +9,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -10,6 +10,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -45,7 +45,7 @@
<?php include("$CFG->javascript"); ?>
</HEAD>
-<BODY <?php if ($focus) { echo "onLoad=setfocus()"; } echo " bgcolor=\"$THEME->body\" topmargin=\"$THEME->topmargin\" leftmargin=\"$THEME->leftmargin\" marginheight=\"$THEME->marginheight\" marginwidth=\"$THEME->marginwidth\" />"; ?>
+<BODY <?php echo " $bodytags"; if ($focus) { echo "onLoad=setfocus()"; } echo " bgcolor=\"$THEME->body\" topmargin=\"$THEME->topmargin\" leftmargin=\"$THEME->leftmargin\" marginheight=\"$THEME->marginheight\" marginwidth=\"$THEME->marginwidth\" />"; ?>
<?php if ($home) { // This is what gets printed on the home page only ?>
@@ -9,6 +9,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -9,6 +9,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -9,6 +9,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -10,6 +10,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -9,6 +9,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}
@@ -9,6 +9,7 @@
</head>
<body<?php
+ echo " $bodytags";
if ($focus) {
echo " onload=setfocus()";
}

0 comments on commit 63f3cbb

Please sign in to comment.