r42774 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42773‎ | r42774 | r42775 >
Date:17:54, 29 October 2008
Author:btongminh
Status:old
Tags:
Comment:
Add link to userrights
Modified paths:
  • /trunk/extensions/NssMySQLAuth/NssMySQLAuth.i18n.php (modified) (history)
  • /trunk/extensions/NssMySQLAuth/SpecialAccountManager.php (modified) (history)

Diff [purge]

Index: trunk/extensions/NssMySQLAuth/NssMySQLAuth.i18n.php
@@ -18,6 +18,7 @@
1919 'am-updated' => 'Your changes have been saved successfully',
2020
2121 'nss-desc' => 'A plugin to authenticate against a libnss-mysql database. Contains an [[Special:AccountManager|account manager]]',
 22+ 'nss-rights' => 'rights',
2223 'nss-save-changes' => 'Save changes',
2324 'nss-create-account-header' => 'Create new account',
2425 'nss-create-account' => 'Create account',
Index: trunk/extensions/NssMySQLAuth/SpecialAccountManager.php
@@ -34,7 +34,7 @@
3535 }
3636
3737 function constructForm() {
38 - global $wgOut, $wgScript;
 38+ global $wgOut, $wgScript, $wgUser;
3939 global $wgUserProperties, $wgActivityModes;
4040
4141 // TODO: wfMsg etc.
@@ -45,7 +45,7 @@
4646
4747 $wgOut->addHTML("<table id=\"userprops\" border=\"1\">\n\t<tr>".
4848 "<th>".wfMsgHtml( 'am-username' ).
49 - "</th><th>".wfMsgHtml( 'am-email' ).
 49+ "</th><th></th><th>".wfMsgHtml( 'am-email' ).
5050 "</th><th>".wfMsgHtml( 'am-active' )."</th>");
5151 foreach( $wgUserProperties as $i ) {
5252 $msg = 'am-'.$i;
@@ -54,11 +54,14 @@
5555 }
5656 $wgOut->addHTML("</tr>\n\n");
5757
 58+ $sk = $wgUser->getSkin();
5859 foreach( $this->users as $user ) {
5960 $name = $user->getName();
6061 $row = "\t<tr>";
6162 $row .= Xml::element( 'td', null, $name );
62 - $row .= "<td>".Xml::input( "am-{$name}-email", 40, $user->getEmail() )."</td>";
 63+ $row .= "<td>".$sk->link( SpecialPage::getTitleFor( 'Userrights' ),
 64+ wfMsg( 'nss-rights' ), array(), array( 'user' => $name ) )."</td>";
 65+ $row .= "<td>".Xml::input( "am-{$name}-email", 30, $user->getEmail() )."</td>";
6366 $select = new XmlSelect( "am-{$name}-active" );
6467 $select->setDefault( $user->getActive() );
6568 foreach( $wgActivityModes as $key )
@@ -69,7 +72,7 @@
7073 foreach( $wgUserProperties as $key ) {
7174 $value = isset( $props[$key] ) ? $props[$key] : '';
7275 $row .= "<td>".Xml::input(
73 - "am-{$name}-{$key}", 40, $value
 76+ "am-{$name}-{$key}", 30, $value
7477 )."</td>";
7578 }
7679 $row .= "</tr>\n";

Status & tagging log