MDL-16676 Developer debug warning if you refer to the old text.html help file.

This commit is contained in:
tjhunt 2008-09-25 07:13:46 +00:00
parent 80f69dc0ee
commit 4225e68f88

View File

@ -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';
}