if ( $rows === false ) {
if ( !$this->including() ) {
$this->doHeader( $opts, 0 );
+ $this->outputNoResults();
$this->getOutput()->setStatusCode( 404 );
}
}
}
$batch->execute();
-
$this->webOutput( $rows, $opts );
$rows->free();
}
}
+ /**
+ * Add the "no results" message to the output
+ */
+ protected function outputNoResults() {
+ $this->getOutput()->addHTML(
+ '<div class="mw-changeslist-empty">' .
+ $this->msg( 'recentchanges-noresult' )->parse() .
+ '</div>'
+ );
+ }
+
/**
* Get the database result for this special page instance. Used by ApiFeedRecentChanges.
*
$rclistOutput .= $list->endRecentChangesList();
if ( $rows->numRows() === 0 ) {
- $this->getOutput()->addHTML(
- '<div class="mw-changeslist-empty">' .
- $this->msg( 'recentchanges-noresult' )->parse() .
- '</div>'
- );
+ $this->outputNoResults();
if ( !$this->including() ) {
$this->getOutput()->setStatusCode( 404 );
}