diff --git a/comment/index.php b/comment/index.php
index 2c70d75888b95..812c454ec4471 100644
--- a/comment/index.php
+++ b/comment/index.php
@@ -72,4 +72,4 @@
echo '';
echo '
';
}
-admin_externalpage_print_footer();
+echo $OUTPUT->footer();
diff --git a/error/index.php b/error/index.php
index 05d7b21536700..629d5d8b93b40 100644
--- a/error/index.php
+++ b/error/index.php
@@ -63,5 +63,5 @@
} else {
print_continue($CFG->wwwroot);
}
- print_footer();
+ echo $OUTPUT->footer();
?>
diff --git a/files/draftfiles.php b/files/draftfiles.php
index ae1d8055e70f9..9b4db09b27e9c 100644
--- a/files/draftfiles.php
+++ b/files/draftfiles.php
@@ -103,7 +103,7 @@
$optionsno = array('itemid'=>$itemid, 'filepath'=>$filepath, 'subdirs'=>$subdirs);
$optionsyes = array('itemid'=>$itemid, 'filepath'=>$filepath, 'delete'=>$delete, 'sesskey'=>sesskey(), 'subdirs'=>$subdirs);
notice_yesno (get_string('deletecheckfiles'), 'draftfiles.php', 'draftfiles.php', $optionsyes, $optionsno, 'post', 'get');
- print_footer('empty');
+ echo $OUTPUT->footer();
die;
} else {
@@ -201,6 +201,6 @@
echo '
';
}
-print_footer('empty');
+echo $OUTPUT->footer();
diff --git a/files/index.php b/files/index.php
index 77b486b0fb1ae..a3eba99b5ea27 100644
--- a/files/index.php
+++ b/files/index.php
@@ -118,7 +118,7 @@
$optionsyes['sesskey'] = sesskey();
notice_yesno (get_string('deletecheckfiles'), 'index.php', 'index.php', $optionsyes, $optionsno, 'post', 'get');
- print_footer();
+ echo $OUTPUT->footer();
die;
}
@@ -174,8 +174,9 @@
/// UI functions /////////////////////////
function html_footer() {
+ global $OUTPUT;
echo '';
- print_footer();
+ echo $OUTPUT->footer();
}
function html_header($context, $file_info){
diff --git a/help.php b/help.php
index 221823e764af7..97c4913af7594 100644
--- a/help.php
+++ b/help.php
@@ -125,7 +125,7 @@
}
$CFG->docroot = ''; // We don't want a doc link here
-print_footer('none');
+echo $OUTPUT->footer();
function file_exists_and_readable($filepath) {
return file_exists($filepath) and is_file($filepath) and is_readable($filepath);
diff --git a/lib/adminlib.php b/lib/adminlib.php
index 4a9c4d23473fe..e7e55330efdb1 100644
--- a/lib/adminlib.php
+++ b/lib/adminlib.php
@@ -5096,9 +5096,9 @@ function admin_externalpage_print_header($focus='') {
*/
function admin_externalpage_print_footer() {
// TODO Still 103 referernces in core code. Don't do debugging output yet.
-// debugging('admin_externalpage_print_footer is deprecated. Please use print_footer ' .
-// '(or even $OUTPUT->footer() instead.', DEBUG_DEVELOPER);
- print_footer();
+ debugging('admin_externalpage_print_footer is deprecated. Please $OUTPUT->footer() instead.', DEBUG_DEVELOPER);
+ global $OUTPUT;
+ echo $OUTPUT->footer();
}
/**
diff --git a/lib/form/editorhelp.php b/lib/form/editorhelp.php
index 50d2a3d1a3693..07fbf29ab44a9 100644
--- a/lib/form/editorhelp.php
+++ b/lib/form/editorhelp.php
@@ -71,7 +71,7 @@
echo ''. get_string('helpindex') .'
';
$CFG->docroot = ''; // We don't want a doc link here
-print_footer('none');
+echo $OUTPUT->footer();
die;
/**
* A function to return a simple link to a help page. We don't want a popup here
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index e31ef01824b05..91feafc091b93 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -1977,7 +1977,7 @@ function get_login_url($loginguest=false) {
* @return mixed Void, exit, and die depending on path
*/
function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsurltome=true) {
- global $CFG, $SESSION, $USER, $COURSE, $FULLME, $PAGE, $SITE, $DB;
+ global $CFG, $SESSION, $USER, $COURSE, $FULLME, $PAGE, $SITE, $DB, $OUTPUT;
/// setup global $COURSE, themes, language and locale
if (!empty($courseorid)) {
@@ -2195,7 +2195,7 @@ function require_login($courseorid=0, $autologinguest=true, $cm=null, $setwantsu
} else {
notify(get_string('guestsnotallowed', '', format_string($COURSE->fullname)));
echo ''.switchroles_form($COURSE->id).'
';
- print_footer($COURSE);
+ echo $OUTPUT->footer();
exit;
}
break;
diff --git a/lib/portfolio/exporter.php b/lib/portfolio/exporter.php
index 9eef16e3d5f6d..657d727a8b1a8 100644
--- a/lib/portfolio/exporter.php
+++ b/lib/portfolio/exporter.php
@@ -276,7 +276,7 @@ public function caller() {
* @return boolean whether or not to process the next stage. this is important as the control function is called recursively.
*/
public function process_stage_config() {
-
+ global $OUTPUT;
$pluginobj = $callerobj = null;
if ($this->instance->has_export_config()) {
$pluginobj = $this->instance;
@@ -336,7 +336,7 @@ public function process_stage_config() {
print_simple_box_start();
$mform->display();
print_simple_box_end();
- print_footer();
+ echo $OUTPUT->footer();
return false;;
}
} else {
@@ -418,7 +418,7 @@ public function process_stage_confirm() {
print_table($table);
notice_yesno($strconfirm, $yesurl, $nourl);
print_simple_box_end();
- print_footer();
+ echo $OUTPUT->footer();
return false;
}
@@ -536,6 +536,7 @@ public function log_transfer() {
* @return boolean whether or not to process the next stage. this is important as the control function is called recursively.
*/
public function process_stage_finished($queued=false) {
+ global $OUTPUT;
$returnurl = $this->caller->get_return_url();
$continueurl = $this->instance->get_continue_url();
$extras = $this->instance->get_extra_finish_options();
@@ -559,7 +560,7 @@ public function process_stage_finished($queued=false) {
echo '' . $string . '
';
}
}
- print_footer();
+ echo $OUTPUT->footer();
return false;
}
@@ -787,12 +788,12 @@ public function get_base_filearea() {
* through the usage of the backbutton
*/
public static function print_expired_export() {
- global $CFG;
+ global $CFG, $OUTPUT;
$title = get_string('exportexpired', 'portfolio');
print_header($title, $title, build_navigation(get_string('exportexpired', 'portfolio')));
notify(get_string('exportexpireddesc', 'portfolio'));
print_continue($CFG->wwwroot);
- print_footer();
+ echo $OUTPUT->footer();
exit;
}
diff --git a/lib/setuplib.php b/lib/setuplib.php
index 28e87765f6e19..885bba28a39e1 100644
--- a/lib/setuplib.php
+++ b/lib/setuplib.php
@@ -785,7 +785,7 @@ function init_eaccelerator() {
*
* - We will initialise $OUTPUT the first time it is used.
* - If, after $OUTPUT has been initialised, the script tries to change something
- * that $OUPTUT depends on, we throw an exception making it clear that the script
+ * that $OUTPUT depends on, we throw an exception making it clear that the script
* did something wrong.
*
*
diff --git a/lib/simpletest/filtersettingsperformancetester.php b/lib/simpletest/filtersettingsperformancetester.php
index 6ccad54c3dea8..57ea981fe5935 100644
--- a/lib/simpletest/filtersettingsperformancetester.php
+++ b/lib/simpletest/filtersettingsperformancetester.php
@@ -116,7 +116,7 @@
print_single_button($baseurl, array('action' => 'test'), 'Run tests', 'get', '', false, '', $issetup != count($requiredtables));
echo '';
-print_footer();
+echo $OUTPUT->footer();
function noop($context) {
}
diff --git a/lib/simpletest/getstringperformancetester.php b/lib/simpletest/getstringperformancetester.php
index b038f21735268..378d356883ca1 100644
--- a/lib/simpletest/getstringperformancetester.php
+++ b/lib/simpletest/getstringperformancetester.php
@@ -49,7 +49,7 @@
foreach ($requiredlangs as $lang) {
if (!isset($installedlangs[$lang])) {
notify('You must install the following language packs to run these test: ' . implode(', ', $requiredlangs));
- print_footer();
+ echo $OUTPUT->footer();
die;
}
}
@@ -101,7 +101,7 @@
}
}
-print_footer();
+echo $OUTPUT->footer();
/**
* plays back one of the files recored by turning on the logging option in string_manager.
diff --git a/lib/upgradelib.php b/lib/upgradelib.php
index fc4903c0afc58..24d00af641eb6 100644
--- a/lib/upgradelib.php
+++ b/lib/upgradelib.php
@@ -756,7 +756,7 @@ function upgrade_finished_handler() {
* @global object
*/
function upgrade_finished($continueurl=null) {
- global $CFG, $DB;
+ global $CFG, $DB, $OUTPUT;
if (!empty($CFG->upgraderunning)) {
unset_config('upgraderunning');
@@ -764,7 +764,7 @@ function upgrade_finished($continueurl=null) {
ignore_user_abort(false);
if ($continueurl) {
print_continue($continueurl);
- print_footer();
+ echo $OUTPUT->footer();
die;
}
}
diff --git a/lib/weblib.php b/lib/weblib.php
index 97f0608445d20..5252458899283 100644
--- a/lib/weblib.php
+++ b/lib/weblib.php
@@ -599,7 +599,7 @@ function break_up_long_words($string, $maxsize=20, $cutchar=' ') {
* to reload the parent window before this one closes.
*/
function close_window($delay = 0, $reloadopener = false) {
- global $THEME, $PAGE;
+ global $THEME, $PAGE, $OUTPUT;
if (!$PAGE->headerprinted) {
print_header(get_string('closewindow'));
@@ -616,7 +616,7 @@ function close_window($delay = 0, $reloadopener = false) {
$PAGE->requires->js_function_call($function)->after_delay($delay);
- print_footer('empty');
+ echo $OUTPUT->footer();
exit;
}
@@ -3063,7 +3063,7 @@ function editorshortcutshelpbutton() {
* @return void This function simply exits
*/
function notice ($message, $link='', $course=NULL) {
- global $CFG, $SITE, $THEME, $COURSE, $PAGE;
+ global $CFG, $SITE, $THEME, $COURSE, $PAGE, $OUTPUT;
$message = clean_text($message); // In case nasties are in here
@@ -3082,11 +3082,7 @@ function notice ($message, $link='', $course=NULL) {
print_box($message, 'generalbox', 'notice');
print_continue($link);
- if (empty($course)) {
- print_footer($COURSE);
- } else {
- print_footer($course);
- }
+ echo $OUTPUT->footer();
exit(1); // general error code
}
@@ -3282,7 +3278,7 @@ function print_maintenance_message() {
echo $CFG->maintenance_message;
print_box_end();
}
- print_footer();
+ echo $OUTPUT->footer();
die;
}
diff --git a/my/index.php b/my/index.php
index 1523c6ea3da0f..d2a0b68b703ae 100644
--- a/my/index.php
+++ b/my/index.php
@@ -13,7 +13,7 @@
print_header($strmymoodle);
notice_yesno(get_string('noguest', 'my') . '
' .
get_string('liketologin'), get_login_url(), $CFG->wwwroot);
- print_footer();
+ echo $OUTPUT->footer();
die;
}
@@ -91,6 +91,6 @@
echo '
...';
}
- print_footer();
+ echo $OUTPUT->footer();
?>
diff --git a/userpix/index.php b/userpix/index.php
index b375de47a2482..58e66f62bda41 100644
--- a/userpix/index.php
+++ b/userpix/index.php
@@ -32,6 +32,6 @@
echo " \n";
}
- print_footer();
+ echo $OUTPUT->footer();
?>
diff --git a/userpix/upgrade.php b/userpix/upgrade.php
index 15d7cf49e1748..bcf1e77e603b2 100644
--- a/userpix/upgrade.php
+++ b/userpix/upgrade.php
@@ -29,6 +29,6 @@
echo " \n";
}
- print_footer();
+ echo $OUTPUT->footer();
?>