merging latest master
[lhc/web/wiklou.git] / includes / api / ApiFeedContributions.php
index 1a8e7ad..1cf760a 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  *
  *
@@ -36,6 +35,8 @@ class ApiFeedContributions extends ApiBase {
 
        /**
         * This module uses a custom feed wrapper printer.
+        *
+        * @return ApiFormatFeedWrapper
         */
        public function getCustomPrinter() {
                return new ApiFormatFeedWrapper( $this->getMain() );
@@ -59,7 +60,7 @@ class ApiFeedContributions extends ApiBase {
                        $this->dieUsage( 'Size difference is disabled in Miser Mode', 'sizediffdisabled' );
                }
 
-               $msg = wfMsgForContent( 'Contributions' );
+               $msg = wfMessage( 'Contributions' )->inContentLanguage()->text();
                $feedTitle = $wgSitename . ' - ' . $msg . ' [' . $wgLanguageCode . ']';
                $feedUrl = SpecialPage::getTitleFor( 'Contributions', $params['user'] )->getFullURL();
 
@@ -73,7 +74,7 @@ class ApiFeedContributions extends ApiBase {
                        $feedUrl
                );
 
-               $pager = new ContribsPager( array(
+               $pager = new ContribsPager( $this->getContext(), array(
                        'target' => $target,
                        'namespace' => $params['namespace'],
                        'year' => $params['year'],
@@ -95,7 +96,7 @@ class ApiFeedContributions extends ApiBase {
        }
 
        protected function feedItem( $row ) {
-               $title = Title::MakeTitle( intval( $row->page_namespace ), $row->page_title );
+               $title = Title::makeTitle( intval( $row->page_namespace ), $row->page_title );
                if( $title ) {
                        $date = $row->rev_timestamp;
                        $comments = $title->getTalkPage()->getFullURL();
@@ -128,7 +129,8 @@ class ApiFeedContributions extends ApiBase {
         */
        protected function feedItemDesc( $revision ) {
                if( $revision ) {
-                       return '<p>' . htmlspecialchars( $revision->getUserText() ) . wfMsgForContent( 'colon-separator' ) .
+                       $msg = wfMessage( 'colon-separator' )->inContentLanguage()->text();
+                       return '<p>' . htmlspecialchars( $revision->getUserText() ) . $msg .
                                htmlspecialchars( FeedItem::stripComment( $revision->getComment() ) ) .
                                "</p>\n<hr />\n<div>" .
                                nl2br( htmlspecialchars( $revision->getText() ) ) . "</div>";
@@ -149,8 +151,7 @@ class ApiFeedContributions extends ApiBase {
                                ApiBase::PARAM_REQUIRED => true,
                        ),
                        'namespace' => array(
-                               ApiBase::PARAM_TYPE => 'namespace',
-                               ApiBase::PARAM_ISMULTI => true
+                               ApiBase::PARAM_TYPE => 'namespace'
                        ),
                        'year' => array(
                                ApiBase::PARAM_TYPE => 'integer'
@@ -204,4 +205,4 @@ class ApiFeedContributions extends ApiBase {
        public function getVersion() {
                return __CLASS__ . ': $Id$';
        }
-}
\ No newline at end of file
+}