Followup r89515, fix double spacing in API Error message
authorSam Reed <reedy@users.mediawiki.org>
Sun, 5 Jun 2011 18:34:26 +0000 (18:34 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 5 Jun 2011 18:34:26 +0000 (18:34 +0000)
Add both customcssprotected and customjsprotected to the possible errors output for editpage

includes/api/ApiBase.php
includes/api/ApiEditPage.php

index d630615..21f6d96 100644 (file)
@@ -970,7 +970,7 @@ abstract class ApiBase {
                'ns-specialprotected' => array( 'code' => 'unsupportednamespace', 'info' => "Pages in the Special namespace can't be edited" ),
                'protectedinterface' => array( 'code' => 'protectednamespace-interface', 'info' => "You're not allowed to edit interface messages" ),
                'namespaceprotected' => array( 'code' => 'protectednamespace', 'info' => "You're not allowed to edit pages in the ``\$1'' namespace" ),
-               'customcssprotected' => array( 'code' => 'customcssprotected', 'info' => "You're not allowed to edit custom CSS  pages" ),
+               'customcssprotected' => array( 'code' => 'customcssprotected', 'info' => "You're not allowed to edit custom CSS pages" ),
                'customjsprotected' => array( 'code' => 'customjsprotected', 'info' => "You're not allowed to edit custom JavaScript pages" ),
                'cascadeprotected' => array( 'code' => 'cascadeprotected', 'info' => "The page you're trying to edit is protected because it's included in a cascade-protected page" ),
                'protectedpagetext' => array( 'code' => 'protectedpage', 'info' => "The ``\$1'' right is required to edit this page" ),
index cda3429..3c09cbc 100644 (file)
@@ -411,6 +411,8 @@ class ApiEditPage extends ApiBase {
                        array( 'unknownerror', 'retval' ),
                        array( 'code' => 'nosuchsection', 'info' => 'There is no section section.' ),
                        array( 'code' => 'invalidsection', 'info' => 'The section parameter must be set to an integer or \'new\'' ),
+                       array( 'customcssprotected' ),
+                       array( 'customjsprotected' ),
                ) );
        }