r101355 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101354‎ | r101355 | r101356 >
Date:13:19, 31 October 2011
Author:catrope
Status:ok
Tags:
Comment:
Followup r101354: pass $this to the PreferencesGetLegend hook so the callee will have a ContextSource to work with
Modified paths:
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/Preferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -1487,6 +1487,7 @@
14881488 Return false and put the merged text into $text to override the default behavior.
14891489
14901490 'PreferencesGetLegend': Override the text used for the <legend> of a preferences section
 1491+$form: the PreferencesForm object. This is a ContextSource as well
14911492 $key: the section name
14921493 &$legend: the legend text. Defaults to wfMsg( "prefs-$key" ) but may be overridden
14931494
Index: trunk/phase3/includes/Preferences.php
@@ -1572,7 +1572,7 @@
15731573 */
15741574 function getLegend( $key ) {
15751575 $legend = parent::getLegend( $key );
1576 - wfRunHooks( 'PreferencesGetLegend', array( $key, &$legend ) );
 1576+ wfRunHooks( 'PreferencesGetLegend', array( $this, $key, &$legend ) );
15771577 return $legend;
15781578 }
15791579 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101354Introduce the PreferencesGetLegend hook. I need this to customize the labels ...catrope12:36, 31 October 2011

Status & tagging log