]> git.mjollnir.org Git - moodle.git/commitdiff
Merged $bodytags parameter in headers from STABLE
authormoodler <moodler>
Wed, 14 Jul 2004 06:54:43 +0000 (06:54 +0000)
committermoodler <moodler>
Wed, 14 Jul 2004 06:54:43 +0000 (06:54 +0000)
16 files changed:
lib/weblib.php
theme/UPGRADE.txt
theme/brightretro/header.html
theme/cordoroyblue/header.html
theme/cornflower/header.html
theme/formal_white/header.html
theme/garden/header.html
theme/metal/header.html
theme/oceanblue/header.html
theme/poweraid/header.html
theme/standard/header.html
theme/standardblue/header.html
theme/standardgreen/header.html
theme/standardlogo/header.html
theme/standardred/header.html
theme/standardwhite/header.html

index 957077d8f5da4b560fd426c9f29afabba23c0aef..74df05723caeb680ca01790d7d6680b45bbc9713 100644 (file)
@@ -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="&nbsp;", $menu="", $usexml=false) {
+                       $cache=true, $button="&nbsp;", $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
index e53d26e348bee9f0a88858a9bf36b6c1cf47b229..bc9d6029dc1bb3512e178449c0dee66e27fb85a2 100644 (file)
@@ -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)
+
index 0643aed3da8eea01306d8d4faf2c8a6739f62590..14567f305e7c2738c9fa3d9ae4ea9aafac17f162 100644 (file)
@@ -10,6 +10,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index a2cc9af4b57e8352ca643cd5ca0c4047acecac00..13765be95340e4eb49b85c57cad1f94f318800f1 100644 (file)
@@ -9,6 +9,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index 9cfbd58e93ef27722cbadb1043bcab8f19a27dac..57fa75debfc0a254064333ab06fd0158dbea1eb4 100644 (file)
@@ -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> 
   
 
index ebb72fe3c207d63d4ef2500897d350626378689b..cd257b4599d3bbf47388701c41de4c2bebc2082a 100644 (file)
@@ -9,6 +9,7 @@
 </head>\r
 \r
 <body<?php \r
+   echo " $bodytags";\r
    if ($focus) { \r
        echo " onload=setfocus()"; \r
    } \r
index abca547226f81331d6730f352d20a8800976cdf9..1d47cbd5befeffd496b57f44997f6affa9128984 100755 (executable)
@@ -10,6 +10,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index c05a785c85db9a87fd273ab56eb4426f02ba0d82..1d314905e18ec9177a470b084e79a77bf898f7c7 100644 (file)
@@ -9,6 +9,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index abca547226f81331d6730f352d20a8800976cdf9..1d47cbd5befeffd496b57f44997f6affa9128984 100644 (file)
@@ -10,6 +10,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index 08bdd5446c4543d6d19f3466fa0c1e221783003a..d79b10b8a352c4acdf1cdcb51ea377b05d12c820 100644 (file)
@@ -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  ?>
index a2cc9af4b57e8352ca643cd5ca0c4047acecac00..13765be95340e4eb49b85c57cad1f94f318800f1 100644 (file)
@@ -9,6 +9,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index a2cc9af4b57e8352ca643cd5ca0c4047acecac00..13765be95340e4eb49b85c57cad1f94f318800f1 100644 (file)
@@ -9,6 +9,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index a2cc9af4b57e8352ca643cd5ca0c4047acecac00..13765be95340e4eb49b85c57cad1f94f318800f1 100644 (file)
@@ -9,6 +9,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index 8dbe42201925ec24f21e2b1b488808406848c2cf..f35c48ca14eabe2716d6d9ef075d24a5b901a4b1 100644 (file)
@@ -10,6 +10,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index a2cc9af4b57e8352ca643cd5ca0c4047acecac00..13765be95340e4eb49b85c57cad1f94f318800f1 100644 (file)
@@ -9,6 +9,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    } 
index a2cc9af4b57e8352ca643cd5ca0c4047acecac00..13765be95340e4eb49b85c57cad1f94f318800f1 100644 (file)
@@ -9,6 +9,7 @@
 </head>
 
 <body<?php 
+   echo " $bodytags";
    if ($focus) { 
        echo " onload=setfocus()"; 
    }