Index: trunk/extensions/NssMySQLAuth/NssMySQLAuth.i18n.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | 'am-updated' => 'Your changes have been saved successfully', |
20 | 20 | |
21 | 21 | 'nss-desc' => 'A plugin to authenticate against a libnss-mysql database. Contains an [[Special:AccountManager|account manager]]', |
| 22 | + 'nss-rights' => 'rights', |
22 | 23 | 'nss-save-changes' => 'Save changes', |
23 | 24 | 'nss-create-account-header' => 'Create new account', |
24 | 25 | 'nss-create-account' => 'Create account', |
Index: trunk/extensions/NssMySQLAuth/SpecialAccountManager.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | } |
36 | 36 | |
37 | 37 | function constructForm() { |
38 | | - global $wgOut, $wgScript; |
| 38 | + global $wgOut, $wgScript, $wgUser; |
39 | 39 | global $wgUserProperties, $wgActivityModes; |
40 | 40 | |
41 | 41 | // TODO: wfMsg etc. |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | |
47 | 47 | $wgOut->addHTML("<table id=\"userprops\" border=\"1\">\n\t<tr>". |
48 | 48 | "<th>".wfMsgHtml( 'am-username' ). |
49 | | - "</th><th>".wfMsgHtml( 'am-email' ). |
| 49 | + "</th><th></th><th>".wfMsgHtml( 'am-email' ). |
50 | 50 | "</th><th>".wfMsgHtml( 'am-active' )."</th>"); |
51 | 51 | foreach( $wgUserProperties as $i ) { |
52 | 52 | $msg = 'am-'.$i; |
— | — | @@ -54,11 +54,14 @@ |
55 | 55 | } |
56 | 56 | $wgOut->addHTML("</tr>\n\n"); |
57 | 57 | |
| 58 | + $sk = $wgUser->getSkin(); |
58 | 59 | foreach( $this->users as $user ) { |
59 | 60 | $name = $user->getName(); |
60 | 61 | $row = "\t<tr>"; |
61 | 62 | $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>"; |
63 | 66 | $select = new XmlSelect( "am-{$name}-active" ); |
64 | 67 | $select->setDefault( $user->getActive() ); |
65 | 68 | foreach( $wgActivityModes as $key ) |
— | — | @@ -69,7 +72,7 @@ |
70 | 73 | foreach( $wgUserProperties as $key ) { |
71 | 74 | $value = isset( $props[$key] ) ? $props[$key] : ''; |
72 | 75 | $row .= "<td>".Xml::input( |
73 | | - "am-{$name}-{$key}", 40, $value |
| 76 | + "am-{$name}-{$key}", 30, $value |
74 | 77 | )."</td>"; |
75 | 78 | } |
76 | 79 | $row .= "</tr>\n"; |