Followup r101354: pass $this to the PreferencesGetLegend hook so the callee will have a ContextSource to work with

This commit is contained in:
Roan Kattouw 2011-10-31 13:19:38 +00:00
parent b2b8ea70db
commit a0a775a9b4
2 changed files with 2 additions and 1 deletions

View file

@ -1487,6 +1487,7 @@ $subject : subject of the new section
Return false and put the merged text into $text to override the default behavior.
'PreferencesGetLegend': Override the text used for the <legend> of a preferences section
$form: the PreferencesForm object. This is a ContextSource as well
$key: the section name
&$legend: the legend text. Defaults to wfMsg( "prefs-$key" ) but may be overridden

View file

@ -1572,7 +1572,7 @@ class PreferencesForm extends HTMLForm {
*/
function getLegend( $key ) {
$legend = parent::getLegend( $key );
wfRunHooks( 'PreferencesGetLegend', array( $key, &$legend ) );
wfRunHooks( 'PreferencesGetLegend', array( $this, $key, &$legend ) );
return $legend;
}
}