From: tjhunt Date: Thu, 25 Sep 2008 07:13:46 +0000 (+0000) Subject: MDL-16676 Developer debug warning if you refer to the old text.html help file. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=4225e68f8839ab16a132233a0087856f1290f17f;p=moodle.git MDL-16676 Developer debug warning if you refer to the old text.html help file. --- diff --git a/lib/weblib.php b/lib/weblib.php index 3b2d44ab1e..d9917b4dc1 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -5856,7 +5856,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; @@ -5864,7 +5864,7 @@ function helpbutton ($page, $title, $module='moodle', $image=true, $linktext=fal //$text option won't work properly because the text needs to be always cleaned and, // when cleaned... html tags always break, so it's unusable. if ( isset($text) && $text!='') { - debugging('Warning: it\'s not recommended to use $text parameter in helpbutton ($page=' . $page . ', $module=' . $module . ') function', DEBUG_DEVELOPER); + debugging('Warning: it\'s not recommended to use $text parameter in helpbutton ($page=' . $page . ', $module=' . $module . ') function', DEBUG_DEVELOPER); } // fix for MDL-7734 @@ -5874,6 +5874,16 @@ function helpbutton ($page, $title, $module='moodle', $image=true, $linktext=fal $forcelang = ''; } + // Catch references to the old text.html and emoticons.html help files that + // were renamed in MDL-13233. + if (in_array($page, array('text', 'emoticons', 'richtext'))) { + $oldname = $page; + $page .= '2'; + debugging("You are referring to the old help file '$oldname'. " . + "This was renamed to '$page' becuase of MDL-13233. " . + "Please update your code.", DEBUG_DEVELOPER); + } + if ($module == '') { $module = 'moodle'; }