Followup r101354: pass $this to the PreferencesGetLegend hook so the callee will...
authorRoan Kattouw <catrope@users.mediawiki.org>
Mon, 31 Oct 2011 13:19:38 +0000 (13:19 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Mon, 31 Oct 2011 13:19:38 +0000 (13:19 +0000)
docs/hooks.txt
includes/Preferences.php

index 17e8c26..cb0120e 100644 (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
 
index 6b2d919..a1d35be 100644 (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;
        }
 }