From a31a18025b749e4dd1b9794c0fb1a6294e6ca08b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 30 Dec 2006 11:39:58 +0000 Subject: [PATCH] * 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 --- RELEASE-NOTES | 3 +++ includes/SpecialPreferences.php | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) 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) { -- 2.20.1