Index: trunk/phase3/includes/SpecialBlockip.php |
— | — | @@ -165,6 +165,13 @@ |
166 | 166 | <input type='hidden' name='wpEditToken' value=\"{$token}\" /> |
167 | 167 | </form>\n" ); |
168 | 168 | |
| 169 | + $user = User::newFromName( $this->BlockAddress ); |
| 170 | + if( is_object( $user ) ) { |
| 171 | + $this->showLogFragment( $wgOut, $user->getUserPage() ); |
| 172 | + } elseif( preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/', $this->BlockAddress ) ) { |
| 173 | + $this->showLogFragment( $wgOut, Title::makeTitle( NS_USER, $this->BlockAddress ) ); |
| 174 | + } |
| 175 | + |
169 | 176 | } |
170 | 177 | |
171 | 178 | function doSubmit() { |
— | — | @@ -267,6 +274,14 @@ |
268 | 275 | $text = wfMsg( 'blockipsuccesstext', $this->BlockAddress ); |
269 | 276 | $wgOut->addWikiText( $text ); |
270 | 277 | } |
| 278 | + |
| 279 | + function showLogFragment( &$out, &$title ) { |
| 280 | + $out->addHtml( wfElement( 'h2', NULL, LogPage::logName( 'block' ) ) ); |
| 281 | + $request = new FauxRequest( array( 'page' => $title->getPrefixedText(), 'type' => 'block' ) ); |
| 282 | + $viewer = new LogViewer( new LogReader( $request ) ); |
| 283 | + $viewer->showList( $out ); |
| 284 | + } |
| 285 | + |
271 | 286 | } |
272 | 287 | |
273 | 288 | ?> |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -166,6 +166,7 @@ |
167 | 167 | * Include SVN revision number in {{CURRENTVERSION}} output, where applicable |
168 | 168 | * Fix bug in wfRunHooks which caused corruption of objects in the hook list |
169 | 169 | * (bug 4979) Use simplified email addresses when running on Windows |
| 170 | +* (bug 4434) Show block log fragment on Special:Blockip |
170 | 171 | |
171 | 172 | == Languages updated == |
172 | 173 | |