Skip to content

Commit

Permalink
Added $return=false parameter to print_footer() using output control …
Browse files Browse the repository at this point in the history
…functions

to capture include() of themed footer HTML.
  • Loading branch information
moquist committed Aug 10, 2006
1 parent 36b6bce commit 469b650
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/weblib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2147,7 +2147,7 @@ function print_header_simple($title='', $heading='', $navigation='', $focus='',
* @param ? $usercourse ? * @param ? $usercourse ?
* @todo Finish documenting this function * @todo Finish documenting this function
*/ */
function print_footer($course=NULL, $usercourse=NULL) { function print_footer($course=NULL, $usercourse=NULL, $return=false) {
global $USER, $CFG, $THEME; global $USER, $CFG, $THEME;


/// Course links /// Course links
Expand Down Expand Up @@ -2210,8 +2210,16 @@ function print_footer($course=NULL, $usercourse=NULL) {


/// Include the actual footer file /// Include the actual footer file


ob_start();
include ($CFG->themedir.current_theme().'/footer.html'); include ($CFG->themedir.current_theme().'/footer.html');
$output = ob_get_contents();
ob_end_clean();


if ($return) {
return $output;
} else {
echo $output;
}
} }


/** /**
Expand Down

0 comments on commit 469b650

Please sign in to comment.