Improve some parameter docs
[lhc/web/wiklou.git] / includes / api / ApiFormatFeedWrapper.php
index 3f53ed4..3ab5ab9 100644 (file)
@@ -46,8 +46,8 @@ class ApiFormatFeedWrapper extends ApiFormatBase {
                // Disable size checking for this because we can't continue
                // cleanly; size checking would cause more problems than it'd
                // solve
-               $result->addValue( null, '_feed', $feed, ApiResult::NO_SIZE_CHECK );
-               $result->addValue( null, '_feeditems', $feedItems, ApiResult::NO_SIZE_CHECK );
+               $result->addValue( null, '_feed', $feed, ApiResult::NO_VALIDATE );
+               $result->addValue( null, '_feeditems', $feedItems, ApiResult::NO_VALIDATE );
        }
 
        /**
@@ -59,15 +59,6 @@ class ApiFormatFeedWrapper extends ApiFormatBase {
                return null;
        }
 
-       /**
-        * Optimization - no need to sanitize data that will not be needed
-        *
-        * @return bool
-        */
-       public function getNeedsRawData() {
-               return true;
-       }
-
        /**
         * ChannelFeed doesn't give us a method to print errors in a friendly
         * manner, so just punt errors to the default printer.
@@ -81,6 +72,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase {
         * This class expects the result data to be in a custom format set by self::setResult()
         * $result['_feed'] - an instance of one of the $wgFeedClasses classes
         * $result['_feeditems'] - an array of FeedItem instances
+        * @param bool $unused
         */
        public function initPrinter( $unused = false ) {
                parent::initPrinter( $unused );
@@ -89,7 +81,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase {
                        return;
                }
 
-               $data = $this->getResultData();
+               $data = $this->getResult()->getResultData();
                if ( isset( $data['_feed'] ) && isset( $data['_feeditems'] ) ) {
                        $data['_feed']->httpHeaders();
                } else {
@@ -104,7 +96,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase {
         * $result['_feeditems'] - an array of FeedItem instances
         */
        public function execute() {
-               $data = $this->getResultData();
+               $data = $this->getResult()->getResultData();
                if ( isset( $data['_feed'] ) && isset( $data['_feeditems'] ) ) {
                        $feed = $data['_feed'];
                        $items = $data['_feeditems'];