X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiFeedRecentChanges.php;h=5adde875f13a30cdef749577bc3ccf8596809d69;hb=9042e649f546433c32bc2094b6550a28b1a8795e;hp=0d2fca6d563cc5f3a08bd59a9bcbad144c9ca602;hpb=aeae6afbbb26c67fd0f20e23d13fa9f3d77420d0;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiFeedRecentChanges.php b/includes/api/ApiFeedRecentChanges.php index 0d2fca6d56..5adde875f1 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(); @@ -147,6 +155,7 @@ class ApiFeedRecentChanges extends ApiBase { 'hideliu' => false, 'hidepatrolled' => false, 'hidemyself' => false, + 'hidecategorization' => false, 'tagfilter' => array( ApiBase::PARAM_TYPE => 'string', @@ -171,7 +180,7 @@ class ApiFeedRecentChanges extends ApiBase { return $ret; } - public function getExamplesMessages() { + protected function getExamplesMessages() { return array( 'action=feedrecentchanges' => 'apihelp-feedrecentchanges-example-simple',