From: Fran Rogers Date: Mon, 18 Aug 2008 18:11:43 +0000 (+0000) Subject: Restore r39518 with fix. No need to be snarky :/ X-Git-Tag: 1.31.0-rc.0~45824 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=5408a4604f00f71d0fdd3ef3c1f7d5166572f1c1;p=lhc%2Fweb%2Fwiklou.git Restore r39518 with fix. No need to be snarky :/ --- 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' );