Merge "HTML escape parameter 'text' of hook 'SkinEditSectionLinks'"
[lhc/web/wiklou.git] / includes / content / ContentHandler.php
index 5c18a33..cc73dd2 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+
 /**
  * Base class for content handling.
  *
@@ -59,7 +60,7 @@ abstract class ContentHandler {
         * If $content is null, this method returns the empty string.
         *
         * If $content is an instance of TextContent, this method returns the flat
-        * text as returned by $content->getNativeData().
+        * text as returned by $content->getText().
         *
         * If $content is not a TextContent object, the behavior of this method
         * depends on the global $wgContentHandlerTextFallback:
@@ -88,7 +89,7 @@ abstract class ContentHandler {
                }
 
                if ( $content instanceof TextContent ) {
-                       return $content->getNativeData();
+                       return $content->getText();
                }
 
                wfDebugLog( 'ContentHandler', 'Accessing ' . $content->getModel() . ' content as text!' );
@@ -667,7 +668,7 @@ abstract class ContentHandler {
         * This default implementation just returns the content language (except for pages
         * in the MediaWiki namespace)
         *
-        * Note that the pages language is not cacheable, since it may in some
+        * Note that the page's language is not cacheable, since it may in some
         * cases depend on user settings.
         *
         * Also note that the page language may or may not depend on the actual content of the page,
@@ -684,7 +685,7 @@ abstract class ContentHandler {
                global $wgLang;
                $pageLang = MediaWikiServices::getInstance()->getContentLanguage();
 
-               if ( $title->getNamespace() == NS_MEDIAWIKI ) {
+               if ( $title->inNamespace( NS_MEDIAWIKI ) ) {
                        // Parse mediawiki messages with correct target language
                        list( /* $unused */, $lang ) = MessageCache::singleton()->figureMessage( $title->getText() );
                        $pageLang = Language::factory( $lang );