]> git.mjollnir.org Git - moodle.git/commitdiff
Fixes MDL-12539 "Help link text for all admin/user filters are broken".
authornfreear <nfreear>
Tue, 11 Dec 2007 13:58:39 +0000 (13:58 +0000)
committernfreear <nfreear>
Tue, 11 Dec 2007 13:58:39 +0000 (13:58 +0000)
lib/weblib.php

index e2fb8154444c935429f4ff0043264d318499d1a4..767a9853a50617d7c2eb1bd417dc315d1d52a26b 100644 (file)
@@ -5802,7 +5802,7 @@ function editorhelpbutton(){
  * @return string
  * @todo Finish documenting this function
  */
-function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext=false, $text='', $return=false,
+function helpbutton ($page, $title, $module='moodle', $image=true, $linktext=false, $text='', $return=false,
                      $imagetext='') {
     global $CFG, $COURSE;
 
@@ -5817,6 +5817,10 @@ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext=
         $module = 'moodle';
     }
 
+    if ($title == '' && $linktext == '') {
+        debugging('Error in call to helpbutton function: at least one of $title and $linktext is required');
+    }
+
     // Warn users about new window for Accessibility
     $tooltip = get_string('helpprefix2', '', trim($title, ". \t")) .' ('.get_string('newwindow').')';
 
@@ -6975,4 +6979,4 @@ function is_in_popup() {
 
 
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
-?>
+?>
\ No newline at end of file