X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFeedRecentChanges.php;h=d24112c7c85c9625fa5d92882321931862a99965;hb=c656c3d7d4c34dfb8832c632df2daa9867bd90a2;hp=0d2fca6d563cc5f3a08bd59a9bcbad144c9ca602;hpb=9a7d90317a5b1b7b36f5291e030325ce94aebb40;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFeedRecentChanges.php b/includes/api/ApiFeedRecentChanges.php index 0d2fca6d56..d24112c7c8 100644 --- a/includes/api/ApiFeedRecentChanges.php +++ b/includes/api/ApiFeedRecentChanges.php @@ -66,9 +66,17 @@ class ApiFeedRecentChanges extends ApiBase { $formatter = $this->getFeedObject( $feedFormat, $specialClass ); - // Everything is passed implicitly via $wgRequest… :( - // The row-getting functionality should maybe be factored out of ChangesListSpecialPage too… + // Parameters are passed via the request in the context… :( + $context = new DerivativeContext( $this ); + $context->setRequest( new DerivativeRequest( + $this->getRequest(), + $this->params, + $this->getRequest()->wasPosted() + ) ); + + // The row-getting functionality should be factored out of ChangesListSpecialPage too… $rc = new $specialClass(); + $rc->setContext( $context ); $rows = $rc->getRows(); $feedItems = $rows ? ChangesFeed::buildItems( $rows ) : array(); @@ -171,7 +179,7 @@ class ApiFeedRecentChanges extends ApiBase { return $ret; } - public function getExamplesMessages() { + protected function getExamplesMessages() { return array( 'action=feedrecentchanges' => 'apihelp-feedrecentchanges-example-simple',