From 5408a4604f00f71d0fdd3ef3c1f7d5166572f1c1 Mon Sep 17 00:00:00 2001 From: Fran Rogers Date: Mon, 18 Aug 2008 18:11:43 +0000 Subject: [PATCH] Restore r39518 with fix. No need to be snarky :/ --- includes/specials/SpecialLog.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php index 3154ed1335..15ccaf0833 100644 --- a/includes/specials/SpecialLog.php +++ b/includes/specials/SpecialLog.php @@ -26,10 +26,21 @@ * constructor */ function wfSpecialLog( $par = '' ) { - global $wgRequest, $wgOut, $wgUser; + global $wgRequest, $wgOut, $wgUser, $wgLogTypes; + # Get parameters - $type = $wgRequest->getVal( 'type', $par ); - $user = $wgRequest->getText( 'user' ); + $parms = explode( '/', ($par = ( $par !== null ) ? $par : '' ) ); + $symsForAll = array( '*', 'all' ); + if ( $parms[0] != '' && ( in_array( $par, $wgLogTypes ) || in_array( $par, $symsForAll ) ) ) { + $type = $par; + $user = $wgRequest->getText( 'user' ); + } else if ( count( $parms ) == 2 ) { + $type = $parms[0]; + $user = $parms[1]; + } else { + $type = $wgRequest->getVal( 'type' ); + $user = ( $par != '' ) ? $par : $wgRequest->getText( 'user' ); + } $title = $wgRequest->getText( 'page' ); $pattern = $wgRequest->getBool( 'pattern' ); $y = $wgRequest->getIntOrNull( 'year' ); -- 2.20.1