Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -580,6 +580,8 @@ |
581 | 581 | * to the key of the message. First element is the message |
582 | 582 | * key, additional optional elements are parameters for the |
583 | 583 | * key that are processed with wgMsgExt and option 'parse' |
| 584 | + * offset Set to overwrite offset parameter in $wgRequest |
| 585 | + * set to '' to unset offset |
584 | 586 | * @return Integer Number of total log items (not limited by $lim) |
585 | 587 | */ |
586 | 588 | public static function showLogExtract( &$out, $types=array(), $page='', $user='', |
— | — | @@ -607,6 +609,8 @@ |
608 | 610 | # Insert list of top 50 (or top $lim) items |
609 | 611 | $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 ); |
610 | 612 | $pager = new LogPager( $loglist, $types, $user, $page, '', $conds ); |
| 613 | + if ( isset( $param['offset'] ) ) # Tell pager to ignore $wgRequest offset |
| 614 | + $pager->setOffset( $param['offset'] ); |
611 | 615 | if( $lim > 0 ) $pager->mLimit = $lim; |
612 | 616 | $logBody = $pager->getBody(); |
613 | 617 | $s = ''; |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -235,7 +235,8 @@ |
236 | 236 | array( |
237 | 237 | 'lim' => 1, |
238 | 238 | 'showIfEmpty' => false, |
239 | | - 'msgKey' => array( 'sp-contributions-blocked-notice' ) |
| 239 | + 'msgKey' => array( 'sp-contributions-blocked-notice' ), |
| 240 | + 'offset' => '' # don't use $wgRequest parameter offset |
240 | 241 | ) |
241 | 242 | ); |
242 | 243 | } |
Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -586,12 +586,12 @@ |
587 | 587 | private function showLogFragment( $out, $title ) { |
588 | 588 | global $wgUser; |
589 | 589 | LogEventsList::showLogExtract( $out, 'block', $title->getPrefixedText(), '', |
590 | | - array( 'lim' => 10, 'msgKey' => array( 'blocklog-showlog' ) ) ); |
| 590 | + array( 'lim' => 10, 'msgKey' => array( 'blocklog-showlog' ), 'showIfEmpty' => false ) ); |
591 | 591 | // Add suppression block entries if allowed |
592 | 592 | if( $wgUser->isAllowed( 'hideuser' ) ) { |
593 | 593 | LogEventsList::showLogExtract( $out, 'suppress', $title->getPrefixedText(), '', |
594 | 594 | array('lim' => 10, 'conds' => array('log_action' => array('block','reblock','unblock')), |
595 | | - 'msgKey' => array( 'blocklog-showsuppresslog' ) ) ); |
| 595 | + 'msgKey' => array( 'blocklog-showsuppresslog' ), 'showIfEmpty' => false ) ); |
596 | 596 | } |
597 | 597 | } |
598 | 598 | |