* to the key of the message. First element is the message
* key, additional optional elements are parameters for the
* key that are processed with wgMsgExt and option 'parse'
+ * offset Set to overwrite offset parameter in $wgRequest
+ * set to '' to unset offset
* @return Integer Number of total log items (not limited by $lim)
*/
public static function showLogExtract( &$out, $types=array(), $page='', $user='',
# Insert list of top 50 (or top $lim) items
$loglist = new LogEventsList( $wgUser->getSkin(), $wgOut, 0 );
$pager = new LogPager( $loglist, $types, $user, $page, '', $conds );
+ if ( isset( $param['offset'] ) ) # Tell pager to ignore $wgRequest offset
+ $pager->setOffset( $param['offset'] );
if( $lim > 0 ) $pager->mLimit = $lim;
$logBody = $pager->getBody();
$s = '';
private function showLogFragment( $out, $title ) {
global $wgUser;
LogEventsList::showLogExtract( $out, 'block', $title->getPrefixedText(), '',
- array( 'lim' => 10, 'msgKey' => array( 'blocklog-showlog' ) ) );
+ array( 'lim' => 10, 'msgKey' => array( 'blocklog-showlog' ), 'showIfEmpty' => false ) );
// Add suppression block entries if allowed
if( $wgUser->isAllowed( 'hideuser' ) ) {
LogEventsList::showLogExtract( $out, 'suppress', $title->getPrefixedText(), '',
array('lim' => 10, 'conds' => array('log_action' => array('block','reblock','unblock')),
- 'msgKey' => array( 'blocklog-showsuppresslog' ) ) );
+ 'msgKey' => array( 'blocklog-showsuppresslog' ), 'showIfEmpty' => false ) );
}
}
array(
'lim' => 1,
'showIfEmpty' => false,
- 'msgKey' => array( 'sp-contributions-blocked-notice' )
+ 'msgKey' => array( 'sp-contributions-blocked-notice' ),
+ 'offset' => '' # don't use $wgRequest parameter offset
)
);
}