From 222b01f5169f1c7e69762e0e8904c24f78f71882 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 28 Jul 2010 11:52:48 +0200 Subject: update to MediaWiki 1.16.0 --- includes/specials/SpecialLog.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'includes/specials/SpecialLog.php') diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index 2382344b..d1ccc8c4 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -52,9 +52,19 @@ function wfSpecialLog( $par = '' ) { $y = ''; $m = ''; } + # Handle type-specific inputs + $qc = array(); + if( $type == 'suppress' ) { + $offender = User::newFromName( $wgRequest->getVal('offender'), false ); + if( $offender && $offender->getId() > 0 ) { + $qc = array( 'ls_field' => 'target_author_id', 'ls_value' => $offender->getId() ); + } else if( $offender && IP::isIPAddress( $offender->getName() ) ) { + $qc = array( 'ls_field' => 'target_author_ip', 'ls_value' => $offender->getName() ); + } + } # Create a LogPager item to get the results and a LogEventsList item to format them... $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 ); - $pager = new LogPager( $loglist, $type, $user, $title, $pattern, array(), $y, $m, $tagFilter ); + $pager = new LogPager( $loglist, $type, $user, $title, $pattern, $qc, $y, $m, $tagFilter ); # Set title and add header $loglist->showHeader( $pager->getType() ); # Show form options -- cgit v1.2.3-54-g00ecf