Permalink
Browse files

print_header should never happen twice on a page - see bug 4198

  • Loading branch information...
moodler
moodler committed Apr 10, 2006
1 parent b839781 commit c9c2d4741dba0c9919d8591f28fd89518247e6d6
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/weblib.php
View
@@ -1718,6 +1718,14 @@ function print_header ($title='', $heading='', $navigation='', $focus='', $meta=
global $USER, $CFG, $THEME, $SESSION, $ME, $SITE, $HTTPSPAGEREQUIRED;
/// This makes sure that the header is never repeated twice on a page
static $headerprinted = false;
if ($headerprinted) {
return;
} else {
$headerprinted = true;
}
/// This is an ugly hack to be replaced later by a proper global $COURSE
global $course;

0 comments on commit c9c2d47

Please sign in to comment.