Merge "Improve docs for Title::getInternalURL/getCanonicalURL"
[lhc/web/wiklou.git] / includes / api / ApiFeedContributions.php
index 9edf929..ed3b7b8 100644 (file)
@@ -137,7 +137,7 @@ class ApiFeedContributions extends ApiBase {
                }
 
                // Hook completed and did not return a valid feed item
-               $title = Title::makeTitle( intval( $row->page_namespace ), $row->page_title );
+               $title = Title::makeTitle( (int)$row->page_namespace, $row->page_title );
                if ( $title && $title->userCan( 'read', $this->getUser() ) ) {
                        $date = $row->rev_timestamp;
                        $comments = $title->getTalkPage()->getFullURL();
@@ -181,7 +181,7 @@ class ApiFeedContributions extends ApiBase {
 
                if ( $content instanceof TextContent ) {
                        // only textual content has a "source view".
-                       $html = nl2br( htmlspecialchars( $content->getNativeData() ) );
+                       $html = nl2br( htmlspecialchars( $content->getText() ) );
                } else {
                        // XXX: we could get an HTML representation of the content via getParserOutput, but that may
                        //     contain JS magic and generally may not be suitable for inclusion in a feed.