summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialLog.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
committerPierre Schmitz <pierre@archlinux.de>2009-02-22 13:37:51 +0100
commitb9b85843572bf283f48285001e276ba7e61b63f6 (patch)
tree4c6f4571552ada9ccfb4030481dcf77308f8b254 /includes/specials/SpecialLog.php
parentd9a20acc4e789cca747ad360d87ee3f3e7aa58c1 (diff)
updated to MediaWiki 1.14.0
Diffstat (limited to 'includes/specials/SpecialLog.php')
-rw-r--r--includes/specials/SpecialLog.php22
1 files changed, 16 insertions, 6 deletions
diff --git a/includes/specials/SpecialLog.php b/includes/specials/SpecialLog.php
index 3154ed13..492c2608 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' );
@@ -40,15 +51,14 @@ function wfSpecialLog( $par = '' ) {
$y = '';
$m = '';
}
- # Create a LogPager item to get the results and a LogEventsList
- # item to format them...
+ # 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 );
# Set title and add header
$loglist->showHeader( $pager->getType() );
# Show form options
$loglist->showOptions( $pager->getType(), $pager->getUser(), $pager->getPage(), $pager->getPattern(),
- $pager->getYear(), $pager->getMonth() );
+ $pager->getYear(), $pager->getMonth(), $pager->getFilterParams() );
# Insert list
$logBody = $pager->getBody();
if( $logBody ) {