* Add hook for extensions to add user information to the panel in preferences,
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 30 Dec 2006 11:39:58 +0000 (11:39 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 30 Dec 2006 11:39:58 +0000 (11:39 +0000)
  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
includes/SpecialPreferences.php

index d06bdaf..8c149b8 100644 (file)
@@ -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 ==
 
index c1137ce..b2e24ca 100644 (file)
@@ -530,19 +530,19 @@ class PreferencesForm {
 
                $wgOut->addHTML( "<fieldset>\n<legend>" . wfMsg('prefs-personal') . "</legend>\n<table>\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) {