Merge "Fix deprecated hooks not having a non-deprecated alternative"
[lhc/web/wiklou.git] / includes / specialpage / ChangesListSpecialPage.php
index 0408182..806a48a 100644 (file)
@@ -53,7 +53,8 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                $opts = $this->getOptions();
                if ( $rows === false ) {
                        if ( !$this->including() ) {
-                               $this->doHeader( $opts );
+                               $this->doHeader( $opts, 0 );
+                               $this->getOutput()->setStatusCode( 404 );
                        }
 
                        return;
@@ -333,7 +334,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
        public function webOutput( $rows, $opts ) {
                if ( !$this->including() ) {
                        $this->outputFeedLinks();
-                       $this->doHeader( $opts );
+                       $this->doHeader( $opts, $rows->numRows() );
                }
 
                $this->outputChangesList( $rows, $opts );
@@ -355,12 +356,12 @@ abstract class ChangesListSpecialPage extends SpecialPage {
        abstract public function outputChangesList( $rows, $opts );
 
        /**
-        * Return the text to be displayed above the changes
+        * Set the text to be displayed above the changes
         *
         * @param FormOptions $opts
-        * @return string XHTML
+        * @param int $numRows Number of rows in the result to show after this header
         */
-       public function doHeader( $opts ) {
+       public function doHeader( $opts, $numRows ) {
                $this->setTopText( $opts );
 
                // @todo Lots of stuff should be done here.