From: Brion Vibber Date: Sat, 30 Dec 2006 11:39:58 +0000 (+0000) Subject: * Add hook for extensions to add user information to the panel in preferences, X-Git-Tag: 1.31.0-rc.0~54729 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=a31a18025b749e4dd1b9794c0fb1a6294e6ca08b;p=lhc%2Fweb%2Fwiklou.git * Add hook for extensions to add user information to the panel in preferences, next to the user name and ID. 'PreferencesUserInformationPanel': Add HTML bits to user information list in preferences form $form : PreferencesForm object &$html : HTML to append to --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d06bdaf1ef..8c149b8edd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -433,6 +433,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN section is renamed; no longer relies on first section name * Stabilize client-side table sorting even if the underlying Javascript sort() implementation is unstable +* Add hook for extensions to add user information to the panel in preferences, + next to the user name and ID. + == Languages updated == diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index c1137cea2c..b2e24ca8fb 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -530,19 +530,19 @@ class PreferencesForm { $wgOut->addHTML( "
\n" . wfMsg('prefs-personal') . "\n\n"); - $wgOut->addHTML( + $userInformationHtml = $this->addRow( wfMsg( 'username'), $wgUser->getName() - ) - ); - - $wgOut->addHTML( + ) . $this->addRow( wfMsg( 'uid' ), $wgUser->getID() - ) - ); + ); + + if( wfRunHooks( 'PreferencesUserInformationPanel', array( $this, &$userInformationHtml ) ) ) { + $wgOut->addHtml( $userInformationHtml ); + } if ($wgAllowRealName) {