Do not allow a user to delete a page they can't edit
[lhc/web/wiklou.git] / includes / api / ApiFormatBase.php
index 03a6843..3a0ed46 100644 (file)
@@ -52,7 +52,7 @@ abstract class ApiFormatBase extends ApiBase {
        }
 
        /**
-        * Overriding class returns the mime type that should be sent to the client.
+        * Overriding class returns the MIME type that should be sent to the client.
         * This method is not called if getIsHtml() returns true.
         * @return string
         */
@@ -354,7 +354,7 @@ class ApiFormatFeedWrapper extends ApiFormatBase {
         * Call this method to initialize output data. See execute()
         * @param ApiResult $result
         * @param object $feed An instance of one of the $wgFeedClasses classes
-        * @param array $feedItems of FeedItem objects
+        * @param array $feedItems Array of FeedItem objects
         */
        public static function setResult( $result, $feed, $feedItems ) {
                // Store output in the Result data.
@@ -362,10 +362,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->disableSizeCheck();
-               $result->addValue( null, '_feed', $feed );
-               $result->addValue( null, '_feeditems', $feedItems );
-               $result->enableSizeCheck();
+               $result->addValue( null, '_feed', $feed, ApiResult::NO_SIZE_CHECK );
+               $result->addValue( null, '_feeditems', $feedItems, ApiResult::NO_SIZE_CHECK );
        }
 
        /**