return;
}
+ $linkClass = 'mw-search-createlink';
if ( $title->isKnown() ) {
$messageName = 'searchmenu-exists';
+ $linkClass = 'mw-search-exists';
} elseif ( $title->quickUserCan( 'create', $this->getUser() ) ) {
$messageName = 'searchmenu-new';
} else {
// Extensions using the hook might still return an empty $messageName
if ( $messageName ) {
- $this->getOutput()->wrapWikiMsg( "<p class=\"mw-search-createlink\">\n$1</p>", $params );
+ $this->getOutput()->wrapWikiMsg( "<p class=\"$linkClass\">\n$1</p>", $params );
} else {
// preserve the paragraph for margins etc...
$this->getOutput()->addHtml( '<p></p>' );
) . "\n";
// Results-info
- if ( $totalNum > 0 ) {
+ if ( $totalNum > 0 && $this->offset < $totalNum ) {
$top = $this->msg( 'showingresultsheader' )
->numParams( $this->offset + 1, $this->offset + $resultsShown, $totalNum )
->params( wfEscapeWikiText( $term ) )