Merge "Use MediaWiki\SuppressWarnings around trigger_error('') instead @"
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchangeslinked.php
index d4aef6c..e42cc70 100644 (file)
@@ -65,7 +65,6 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                        $outputPage->addHTML(
                                Html::errorBox( $this->msg( 'allpagesbadtitle' )->parse() )
                        );
-
                        return false;
                }
 
@@ -295,11 +294,22 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
        }
 
        protected function outputNoResults() {
-               if ( $this->getTargetTitle() === false ) {
+               $targetTitle = $this->getTargetTitle();
+               if ( $targetTitle === false ) {
+                       $this->getOutput()->addHTML(
+                               Html::rawElement(
+                                       'div',
+                                       [ 'class' => 'mw-changeslist-empty mw-changeslist-notargetpage' ],
+                                       $this->msg( 'recentchanges-notargetpage' )->parse()
+                               )
+                       );
+               } elseif ( !$targetTitle || $targetTitle->isExternal() ) {
                        $this->getOutput()->addHTML(
-                               '<div class="mw-changeslist-notargetpage">' .
-                               $this->msg( 'recentchanges-notargetpage' )->parse() .
-                               '</div>'
+                               Html::rawElement(
+                                       'div',
+                                       [ 'class' => 'mw-changeslist-empty mw-changeslist-invalidtargetpage' ],
+                                       $this->msg( 'allpagesbadtitle' )->parse()
+                               )
                        );
                } else {
                        parent::outputNoResults();