From: moodler <moodler> Date: Wed, 14 Jul 2004 06:54:43 +0000 (+0000) Subject: Merged $bodytags parameter in headers from STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=63f3cbbd7d80bc3c5ca1ae30ae88c94097cd38b9;p=moodle.git Merged $bodytags parameter in headers from STABLE --- diff --git a/lib/weblib.php b/lib/weblib.php index 957077d8f5..74df05723c 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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 diff --git a/theme/UPGRADE.txt b/theme/UPGRADE.txt index e53d26e348..bc9d6029dc 100644 --- a/theme/UPGRADE.txt +++ b/theme/UPGRADE.txt @@ -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) + diff --git a/theme/brightretro/header.html b/theme/brightretro/header.html index 0643aed3da..14567f305e 100644 --- a/theme/brightretro/header.html +++ b/theme/brightretro/header.html @@ -10,6 +10,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/cordoroyblue/header.html b/theme/cordoroyblue/header.html index a2cc9af4b5..13765be953 100644 --- a/theme/cordoroyblue/header.html +++ b/theme/cordoroyblue/header.html @@ -9,6 +9,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/cornflower/header.html b/theme/cornflower/header.html index 9cfbd58e93..57fa75debf 100644 --- a/theme/cornflower/header.html +++ b/theme/cornflower/header.html @@ -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> diff --git a/theme/formal_white/header.html b/theme/formal_white/header.html index ebb72fe3c2..cd257b4599 100644 --- a/theme/formal_white/header.html +++ b/theme/formal_white/header.html @@ -9,6 +9,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/garden/header.html b/theme/garden/header.html index abca547226..1d47cbd5be 100755 --- a/theme/garden/header.html +++ b/theme/garden/header.html @@ -10,6 +10,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/metal/header.html b/theme/metal/header.html index c05a785c85..1d314905e1 100644 --- a/theme/metal/header.html +++ b/theme/metal/header.html @@ -9,6 +9,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/oceanblue/header.html b/theme/oceanblue/header.html index abca547226..1d47cbd5be 100644 --- a/theme/oceanblue/header.html +++ b/theme/oceanblue/header.html @@ -10,6 +10,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/poweraid/header.html b/theme/poweraid/header.html index 08bdd5446c..d79b10b8a3 100644 --- a/theme/poweraid/header.html +++ b/theme/poweraid/header.html @@ -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 ?> diff --git a/theme/standard/header.html b/theme/standard/header.html index a2cc9af4b5..13765be953 100644 --- a/theme/standard/header.html +++ b/theme/standard/header.html @@ -9,6 +9,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/standardblue/header.html b/theme/standardblue/header.html index a2cc9af4b5..13765be953 100644 --- a/theme/standardblue/header.html +++ b/theme/standardblue/header.html @@ -9,6 +9,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/standardgreen/header.html b/theme/standardgreen/header.html index a2cc9af4b5..13765be953 100644 --- a/theme/standardgreen/header.html +++ b/theme/standardgreen/header.html @@ -9,6 +9,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/standardlogo/header.html b/theme/standardlogo/header.html index 8dbe422019..f35c48ca14 100644 --- a/theme/standardlogo/header.html +++ b/theme/standardlogo/header.html @@ -10,6 +10,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/standardred/header.html b/theme/standardred/header.html index a2cc9af4b5..13765be953 100644 --- a/theme/standardred/header.html +++ b/theme/standardred/header.html @@ -9,6 +9,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; } diff --git a/theme/standardwhite/header.html b/theme/standardwhite/header.html index a2cc9af4b5..13765be953 100644 --- a/theme/standardwhite/header.html +++ b/theme/standardwhite/header.html @@ -9,6 +9,7 @@ </head> <body<?php + echo " $bodytags"; if ($focus) { echo " onload=setfocus()"; }