Index: trunk/phase3/includes/specials/SpecialLog.php |
— | — | @@ -26,10 +26,21 @@ |
27 | 27 | * constructor |
28 | 28 | */ |
29 | 29 | function wfSpecialLog( $par = '' ) { |
30 | | - global $wgRequest, $wgOut, $wgUser; |
| 30 | + global $wgRequest, $wgOut, $wgUser, $wgLogTypes; |
| 31 | + |
31 | 32 | # 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 | + } |
34 | 45 | $title = $wgRequest->getText( 'page' ); |
35 | 46 | $pattern = $wgRequest->getBool( 'pattern' ); |
36 | 47 | $y = $wgRequest->getIntOrNull( 'year' ); |