]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19799 Converted all print_footer() calls
authornicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 14:21:34 +0000 (14:21 +0000)
committernicolasconnault <nicolasconnault>
Thu, 6 Aug 2009 14:21:34 +0000 (14:21 +0000)
17 files changed:
comment/index.php
error/index.php
files/draftfiles.php
files/index.php
help.php
lib/adminlib.php
lib/form/editorhelp.php
lib/moodlelib.php
lib/portfolio/exporter.php
lib/setuplib.php
lib/simpletest/filtersettingsperformancetester.php
lib/simpletest/getstringperformancetester.php
lib/upgradelib.php
lib/weblib.php
my/index.php
userpix/index.php
userpix/upgrade.php

index 2c70d75888b95856c3926067559533fa73f9eca6..812c454ec4471405d1439e58b962db2c23d7178b 100644 (file)
@@ -72,4 +72,4 @@ if (empty($action)) {
     echo '<button id="comments_delete">'.get_string('delete').'</button>';
     echo '<div>';
 }
-admin_externalpage_print_footer();
+echo $OUTPUT->footer();
index 05d7b215367002dd969e4033543a6b431ef6304b..629d5d8b93b40330bac1f2dfc28c0bfed0bb2736 100644 (file)
@@ -63,5 +63,5 @@
     } else {
         print_continue($CFG->wwwroot);
     }
-    print_footer();
+    echo $OUTPUT->footer();
 ?>
index ae1d8055e70f91e0da799ab90989227dcff025f7..9b4db09b27e9c50346e1b1ee2f31860f276d2073 100644 (file)
@@ -103,7 +103,7 @@ if ($delete !== '' and $file = $fs->get_file($contextid, $filearea, $itemid, $fi
         $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 @@ if ($subdirs) {
     echo '</div></form>';
 }
 
-print_footer('empty');
+echo $OUTPUT->footer();
 
 
index 77b486b0fb1aecaa69f5fdab7b7c9fcf741d721c..a3eba99b5ea27fc5214ad7ad0fd658f9f7d5cbb1 100644 (file)
@@ -118,7 +118,7 @@ if ($file_info and $delete) {
         $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 @@ html_footer();
 /// UI functions /////////////////////////
 
 function html_footer() {
+    global $OUTPUT;
     echo '</td></tr></table>';
-    print_footer();
+    echo $OUTPUT->footer();
 }
 
 function html_header($context, $file_info){
index 221823e764af70feaf4e3edc948d6c68ec6d7be8..97c4913af75942808c119899828f89d53ad48f4a 100644 (file)
--- a/help.php
+++ b/help.php
@@ -125,7 +125,7 @@ if ($file && $helpfound && ($foundlang != 'en_utf8' || ($forcelang == 'en_utf8'
 }
 
 $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);
index 4a9c4d23473fee02425e0e9186b59683122fa5b9..e7e55330efdb1aa811d7a7481a2b7a94580cb303 100644 (file)
@@ -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();
 }
 
 /**
index 50d2a3d1a36939d7586c2ec91a326bd5316c55ec..07fbf29ab44a966edc4c0ef3f3b09cf772905926 100644 (file)
@@ -71,7 +71,7 @@ global $CFG;
 echo '<p align="center"><a href="'.$CFG->wwwroot.'/help.php?file=index.html">'. get_string('helpindex') .'</a></p>';
 
 $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
index e31ef01824b0588ee85b581e01ee6ee96e462132..91feafc091b936009c94f4b1223599d9134e7839 100644 (file)
@@ -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 '<div class="notifyproblem">'.switchroles_form($COURSE->id).'</div>';
-                        print_footer($COURSE);
+                        echo $OUTPUT->footer();
                         exit;
                     }
                     break;
index 9eef16e3d5f6dafad2c709e4f4942c741cda0644..657d727a8b1a85c4a3b260512e072df7224ff94c 100644 (file)
@@ -276,7 +276,7 @@ class portfolio_exporter {
     * @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 @@ class portfolio_exporter {
                 print_simple_box_start();
                 $mform->display();
                 print_simple_box_end();
-                print_footer();
+                echo $OUTPUT->footer();
                 return false;;
             }
         } else {
@@ -418,7 +418,7 @@ class portfolio_exporter {
         print_table($table);
         notice_yesno($strconfirm, $yesurl, $nourl);
         print_simple_box_end();
-        print_footer();
+        echo $OUTPUT->footer();
         return false;
     }
 
@@ -536,6 +536,7 @@ class portfolio_exporter {
     * @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 @@ class portfolio_exporter {
                 echo '<a href="' . $link . '">' . $string . '</a><br />';
             }
         }
-        print_footer();
+        echo $OUTPUT->footer();
         return false;
     }
 
@@ -787,12 +788,12 @@ class portfolio_exporter {
     * 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;
     }
 
index 28e87765f6e192b8162198559283bf8744fcf350..885bba28a39e13796a71c09274a278c9e43e1861 100644 (file)
@@ -785,7 +785,7 @@ function init_eaccelerator() {
  * <ol>
  * <li>We will initialise $OUTPUT the first time it is used.</li>
  * <li>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.
  * </ol>
  *
index 6ccad54c3dea8411c199bb87de5e12110a9efe65..57ea981fe5935f6f1b3311c9b5bd9e01483e4631 100644 (file)
@@ -116,7 +116,7 @@ print_single_button($baseurl, array('action' => 'teardown'), 'Drop test tables',
 print_single_button($baseurl, array('action' => 'test'), 'Run tests', 'get', '', false, '', $issetup != count($requiredtables));
 echo '</div>';
 
-print_footer();
+echo $OUTPUT->footer();
 
 function noop($context) {
 }
index b038f2173526876d7b60b64ad4d540b0b872df53..378d356883ca19f2eafbbbb31a46983b493f8da8 100644 (file)
@@ -49,7 +49,7 @@ array_pop($requiredlangs);
 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 @@ try {
     }
 }
 
-print_footer();
+echo $OUTPUT->footer();
 
 /**
  * plays back one of the files recored by turning on the logging option in string_manager.
index fc4903c0afc58c9a589fd24a3c2a2001be95a431..24d00af641eb61456c5a7116f41a3663a4d3337c 100644 (file)
@@ -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;
         }
     }
index 97f0608445d2036b93f38b19dd2e07b8a3cdff3a..5252458899283bd050a062fda91c7bc05a7bb2a2 100644 (file)
@@ -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;
 }
 
index 1523c6ea3da0fd2f4d56b905e115f425b121d63f..d2a0b68b703aeb5d132793e62f89a27d34ba20de 100644 (file)
@@ -13,7 +13,7 @@
         print_header($strmymoodle);
         notice_yesno(get_string('noguest', 'my') . '<br /><br />' .
                 get_string('liketologin'), get_login_url(), $CFG->wwwroot);
-        print_footer();
+        echo $OUTPUT->footer();
         die;
     }
 
@@ -91,6 +91,6 @@
         echo '<br />...';  
     }
 
-    print_footer();
+    echo $OUTPUT->footer();
 
 ?>
index b375de47a2482fec05e8ac5f9c0e04df48a063a4..58e66f62bda418f7f2ce25049eb2aa3c18f55ed9 100644 (file)
@@ -32,6 +32,6 @@
         echo "</a> \n";
     }
 
-    print_footer();
+    echo $OUTPUT->footer();
 
 ?>
index 15d7cf49e174881a840a4ac4e1dbb15304c3d103..bcf1e77e603b2089c1d1950450c73c9d40b54b26 100644 (file)
@@ -29,6 +29,6 @@
         echo "</a> \n";
     }
 
-    print_footer();
+    echo $OUTPUT->footer();
 
 ?>