r39599 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39598‎ | r39599 | r39600 >
Date:18:11, 18 August 2008
Author:krimpet
Status:old
Tags:
Comment:
Restore r39518 with fix. No need to be snarky :/
Modified paths:
  • /trunk/phase3/includes/specials/SpecialLog.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialLog.php
@@ -26,10 +26,21 @@
2727 * constructor
2828 */
2929 function wfSpecialLog( $par = '' ) {
30 - global $wgRequest, $wgOut, $wgUser;
 30+ global $wgRequest, $wgOut, $wgUser, $wgLogTypes;
 31+
3132 # Get parameters
32 - $type = $wgRequest->getVal( 'type', $par );
33 - $user = $wgRequest->getText( 'user' );
 33+ $parms = explode( '/', ($par = ( $par !== null ) ? $par : '' ) );
 34+ $symsForAll = array( '*', 'all' );
 35+ if ( $parms[0] != '' && ( in_array( $par, $wgLogTypes ) || in_array( $par, $symsForAll ) ) ) {
 36+ $type = $par;
 37+ $user = $wgRequest->getText( 'user' );
 38+ } else if ( count( $parms ) == 2 ) {
 39+ $type = $parms[0];
 40+ $user = $parms[1];
 41+ } else {
 42+ $type = $wgRequest->getVal( 'type' );
 43+ $user = ( $par != '' ) ? $par : $wgRequest->getText( 'user' );
 44+ }
3445 $title = $wgRequest->getText( 'page' );
3546 $pattern = $wgRequest->getBool( 'pattern' );
3647 $y = $wgRequest->getIntOrNull( 'year' );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r39518Per request in bug 15194, add more syntax for Special:Log, similar to Special...krimpet05:06, 17 August 2008

Status & tagging log