r16287 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r16286‎ | r16287 | r16288 >
Date:14:36, 30 August 2006
Author:robchurch
Status:old
Tags:
Comment:
* (bug 4434) Show block log fragment on Special:Blockip
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialBlockip.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialBlockip.php
@@ -165,6 +165,13 @@
166166 <input type='hidden' name='wpEditToken' value=\"{$token}\" />
167167 </form>\n" );
168168
 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+
169176 }
170177
171178 function doSubmit() {
@@ -267,6 +274,14 @@
268275 $text = wfMsg( 'blockipsuccesstext', $this->BlockAddress );
269276 $wgOut->addWikiText( $text );
270277 }
 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+
271286 }
272287
273288 ?>
Index: trunk/phase3/RELEASE-NOTES
@@ -166,6 +166,7 @@
167167 * Include SVN revision number in {{CURRENTVERSION}} output, where applicable
168168 * Fix bug in wfRunHooks which caused corruption of objects in the hook list
169169 * (bug 4979) Use simplified email addresses when running on Windows
 170+* (bug 4434) Show block log fragment on Special:Blockip
170171
171172 == Languages updated ==
172173

Follow-up revisions

RevisionCommit summaryAuthorDate
r77273Remove redundant link 'Existing blocks for $1' because the blog log is shown ...raymond08:25, 25 November 2010