X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFeedContributions.php;h=d808075680e8b233a4ebfd07af80b0388c084188;hb=4807964201b1233d4f932de9571488587143371e;hp=c1e6ff6e07f604df7c7d8fd98b6774f49571914a;hpb=f4cff4386866a3e66266bbe18a1f3dd0c82406a9;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFeedContributions.php b/includes/api/ApiFeedContributions.php index c1e6ff6e07..d808075680 100644 --- a/includes/api/ApiFeedContributions.php +++ b/includes/api/ApiFeedContributions.php @@ -1,5 +1,4 @@ getMain() ); @@ -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,11 +96,11 @@ 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(); - $revision = Revision::newFromRow( $row); + $revision = Revision::newFromRow( $row ); return new FeedItem( $title->getPrefixedText(), @@ -149,8 +150,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' @@ -195,7 +195,7 @@ class ApiFeedContributions extends ApiBase { ) ); } - protected function getExamples() { + public function getExamples() { return array( 'api.php?action=feedcontributions&user=Reedy', ); @@ -204,4 +204,4 @@ class ApiFeedContributions extends ApiBase { public function getVersion() { return __CLASS__ . ': $Id$'; } -} \ No newline at end of file +}