Minor fixup to api/ApiEditPage.php to remove getMaxArticleSize function
authorSam Reed <reedy@users.mediawiki.org>
Tue, 16 Feb 2010 22:01:38 +0000 (22:01 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Tue, 16 Feb 2010 22:01:38 +0000 (22:01 +0000)
includes/api/ApiEditPage.php

index e85da4b..23f5310 100644 (file)
@@ -341,6 +341,8 @@ class ApiEditPage extends ApiBase {
        }
        
        public function getPossibleErrors() {
+               global $wgMaxArticleSize;
+       
                return array_merge( parent::getPossibleErrors(), array(
                        array( 'missingparam', 'title' ),
                        array( 'missingtext' ),
@@ -358,7 +360,7 @@ class ApiEditPage extends ApiBase {
                        array( 'spamdetected', 'spam' ),
                        array( 'filtered' ),
                        array( 'blockedtext' ),
-                       array( 'contenttoobig', $this->getMaxArticleSize() ),
+                       array( 'contenttoobig', $wgMaxArticleSize ),
                        array( 'noedit-anon' ),
                        array( 'noedit' ),
                        array( 'actionthrottledtext' ),
@@ -373,11 +375,6 @@ class ApiEditPage extends ApiBase {
                ) );
        }
 
-       private function getMaxArticleSize() {
-               global $wgMaxArticleSize;
-               return $wgMaxArticleSize;
-       }
-
        protected function getAllowedParams() {
                return array (
                        'title' => null,