Index: trunk/extensions/LastUserLogin/LastUserLogin_body.php |
— | — | @@ -25,8 +25,8 @@ |
26 | 26 | } |
27 | 27 | |
28 | 28 | # If the user doesn't have the required 'lastlogin' permission, display an error |
29 | | - if ( !$wgUser->isAllowed( 'lastlogin' ) ) { |
30 | | - $wgOut->permissionRequired( 'lastlogin' ); |
| 29 | + if ( !$this->userCanExecute( $wgUser ) ) { |
| 30 | + $this->displayRestrictionError(); |
31 | 31 | return; |
32 | 32 | } |
33 | 33 | |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | $style = 'style="border:1px solid #000"'; |
87 | 87 | $out .= "<td $style>" . $wgLang->timeanddate( wfTimestamp( TS_MW, $row[$key] ), true ) . |
88 | 88 | '</td><td style="border: 1px solid #000; text-align:right;">' . |
89 | | - $wgLang->formatNum( round( ( mktime() - wfTimestamp( TS_UNIX, $row[$key] ) ) / 3600 / 24, 2 ), 2 ) . "</td>"; |
| 89 | + $wgLang->formatNum( round( ( time() - wfTimestamp( TS_UNIX, $row[$key] ) ) / 3600 / 24, 2 ), 2 ) . "</td>"; |
90 | 90 | } else { |
91 | 91 | if ( $key == 'user_name' ) { |
92 | 92 | $userPage = Title::makeTitle( NS_USER, $row[$key] ); |