Merge "[MCR] Add test for PageArchive::listRevisions"
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchangeslinked.php
index 99880de..d4aef6c 100644 (file)
@@ -62,8 +62,9 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                $outputPage = $this->getOutput();
                $title = Title::newFromText( $target );
                if ( !$title || $title->isExternal() ) {
-                       $outputPage->addHTML( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )
-                                       ->parse() . '</div>' );
+                       $outputPage->addHTML(
+                               Html::errorBox( $this->msg( 'allpagesbadtitle' )->parse() )
+                       );
 
                        return false;
                }
@@ -292,4 +293,16 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
        public function prefixSearchSubpages( $search, $limit, $offset ) {
                return $this->prefixSearchString( $search, $limit, $offset );
        }
+
+       protected function outputNoResults() {
+               if ( $this->getTargetTitle() === false ) {
+                       $this->getOutput()->addHTML(
+                               '<div class="mw-changeslist-notargetpage">' .
+                               $this->msg( 'recentchanges-notargetpage' )->parse() .
+                               '</div>'
+                       );
+               } else {
+                       parent::outputNoResults();
+               }
+       }
 }