Merge "resourceloader: Minor clean up in mw.loader and mw.html"
[lhc/web/wiklou.git] / includes / Title.php
index 895cc0e..bbc1d63 100644 (file)
@@ -1489,10 +1489,10 @@ class Title implements LinkTarget {
        public function isRawHtmlMessage() {
                global $wgRawHtmlMessages;
 
-               if ( $this->inNamespace( NS_MEDIAWIKI ) ) {
+               if ( !$this->inNamespace( NS_MEDIAWIKI ) ) {
                        return false;
                }
-               $message = lcfirst( $this->getRootText() );
+               $message = lcfirst( $this->getRootTitle()->getDBkey() );
                return in_array( $message, $wgRawHtmlMessages, true );
        }
 
@@ -1665,7 +1665,7 @@ class Title implements LinkTarget {
                        if ( $nsText === false ) {
                                // See T165149. Awkward, but better than erroneously linking to the main namespace.
                                $nsText = MediaWikiServices::getInstance()->getContentLanguage()->
-                                       getNsText( NS_SPECIAL ) .  ":Badtitle/NS{$this->mNamespace}";
+                                       getNsText( NS_SPECIAL ) . ":Badtitle/NS{$this->mNamespace}";
                        }
 
                        $p .= $nsText . ':';