r56999 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r56998‎ | r56999 | r57000 >
Date:23:18, 27 September 2009
Author:siebrand
Status:ok
Tags:
Comment:
* support GENDER in 'blocklog-showlog' and 'blocklog-showsuppresslog'
* break long lines
Modified paths:
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -585,13 +585,44 @@
586586
587587 private function showLogFragment( $out, $title ) {
588588 global $wgUser;
589 - LogEventsList::showLogExtract( $out, 'block', $title->getPrefixedText(), '',
590 - array( 'lim' => 10, 'msgKey' => array( 'blocklog-showlog' ), 'showIfEmpty' => false ) );
 589+
 590+ // Used to support GENDER in 'blocklog-showlog' and 'blocklog-showsuppresslog'
 591+ $userBlocked = $title->getText();
 592+
 593+ LogEventsList::showLogExtract(
 594+ $out,
 595+ 'block',
 596+ $title->getPrefixedText(),
 597+ '',
 598+ array(
 599+ 'lim' => 10,
 600+ 'msgKey' => array(
 601+ 'blocklog-showlog',
 602+ $userBlocked
 603+ ),
 604+ 'showIfEmpty' => false
 605+ )
 606+ );
 607+
591608 // Add suppression block entries if allowed
592609 if( $wgUser->isAllowed( 'hideuser' ) ) {
593610 LogEventsList::showLogExtract( $out, 'suppress', $title->getPrefixedText(), '',
594 - array('lim' => 10, 'conds' => array('log_action' => array('block','reblock','unblock')),
595 - 'msgKey' => array( 'blocklog-showsuppresslog' ), 'showIfEmpty' => false ) );
 611+ array(
 612+ 'lim' => 10,
 613+ 'conds' => array(
 614+ 'log_action' => array(
 615+ 'block',
 616+ 'reblock',
 617+ 'unblock'
 618+ )
 619+ ),
 620+ 'msgKey' => array(
 621+ 'blocklog-showsuppresslog',
 622+ $userBlocked
 623+ ),
 624+ 'showIfEmpty' => false
 625+ )
 626+ );
596627 }
597628 }
598629

Status & tagging log