- list( $early, $late ) = $finder->getEditLimits();
- $lastts = count( $contribs ) ? $contribs[count( $contribs ) - 1]->rev_timestamp : 0;
- $atstart = ( !count( $contribs ) || $late == $contribs[0]->rev_timestamp );
- $atend = ( !count( $contribs ) || $early == $lastts );
-
- // These four are defaults
- $newestlink = wfMsgHtml( 'sp-contributions-newest' );
- $oldestlink = wfMsgHtml( 'sp-contributions-oldest' );
- $newerlink = wfMsgHtml( 'sp-contributions-newer', $options['limit'] );
- $olderlink = wfMsgHtml( 'sp-contributions-older', $options['limit'] );
-
- if ( !$atstart ) {
- $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'offset' => '' ), $options ) );
- $newestlink = "<a href=\"$stuff\">$newestlink</a>";
- $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'go' => 'prev' ), $options ) );
- $newerlink = "<a href=\"$stuff\">$newerlink</a>";
- }
-
- if ( !$atend ) {
- $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'go' => 'first' ), $options ) );
- $oldestlink = "<a href=\"$stuff\">$oldestlink</a>";
- $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'offset' => $lastts ), $options ) );
- $olderlink = "<a href=\"$stuff\">$olderlink</a>";
- }
-
- if ( $target == 'newbies' ) {
- $firstlast ="($newestlink)";
- } else {
- $firstlast = "($newestlink | $oldestlink)";
- }
-
- $urls = array();
- foreach ( array( 20, 50, 100, 250, 500 ) as $num ) {
- $stuff = $title->escapeLocalURL( wfArrayToCGI( array( 'limit' => $num ), $options ) );
- $urls[] = "<a href=\"$stuff\">".$wgLang->formatNum( $num )."</a>";
+ # Show a message about slave lag, if applicable
+ if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
+ $wgOut->showLagWarning( $lag );
+
+ $wgOut->addHTML(
+ '<p>' . $pager->getNavigationBar() . '</p>' .
+ $pager->getBody() .
+ '<p>' . $pager->getNavigationBar() . '</p>' );
+
+ # If there were contributions, and it was a valid user or IP, show
+ # the appropriate "footer" message - WHOIS tools, etc.
+ if( $target != 'newbies' ) {
+ $message = IP::isIPAddress( $target )
+ ? 'sp-contributions-footer-anon'
+ : 'sp-contributions-footer';
+
+
+ $text = wfMsg( $message, $target );
+ if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
+ $wgOut->addHtml( '<div class="mw-contributions-footer">' );
+ $wgOut->addWikiText( $text );
+ $wgOut->addHtml( '</div>' );
+ }