API: Remove leading/trailing spaces from error and description text
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 27 Oct 2013 16:24:15 +0000 (17:24 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sun, 27 Oct 2013 16:24:15 +0000 (17:24 +0100)
Change-Id: Id866c7258a297fe965a64d52e3458d53e140aa4c

includes/api/ApiLogin.php
includes/api/ApiQueryRandom.php

index b51d441..13e58b8 100644 (file)
@@ -254,9 +254,9 @@ class ApiLogin extends ApiBase {
 
        public function getDescription() {
                return array(
-                       'Log in and get the authentication tokens. ',
+                       'Log in and get the authentication tokens.',
                        'In the event of a successful log-in, a cookie will be attached',
-                       'to your session. In the event of a failed log-in, you will not ',
+                       'to your session. In the event of a failed log-in, you will not',
                        'be able to attempt another log-in through this method for 5 seconds.',
                        'This is to prevent password guessing by automated password crackers'
                );
@@ -267,10 +267,10 @@ class ApiLogin extends ApiBase {
                        array( 'code' => 'NeedToken', 'info' => 'You need to resubmit your login with the specified token. See https://bugzilla.wikimedia.org/show_bug.cgi?id=23076' ),
                        array( 'code' => 'WrongToken', 'info' => 'You specified an invalid token' ),
                        array( 'code' => 'NoName', 'info' => 'You didn\'t set the lgname parameter' ),
-                       array( 'code' => 'Illegal', 'info' => ' You provided an illegal username' ),
-                       array( 'code' => 'NotExists', 'info' => ' The username you provided doesn\'t exist' ),
-                       array( 'code' => 'EmptyPass', 'info' => ' You didn\'t set the lgpassword parameter or you left it empty' ),
-                       array( 'code' => 'WrongPass', 'info' => ' The password you provided is incorrect' ),
+                       array( 'code' => 'Illegal', 'info' => 'You provided an illegal username' ),
+                       array( 'code' => 'NotExists', 'info' => 'The username you provided doesn\'t exist' ),
+                       array( 'code' => 'EmptyPass', 'info' => 'You didn\'t set the lgpassword parameter or you left it empty' ),
+                       array( 'code' => 'WrongPass', 'info' => 'The password you provided is incorrect' ),
                        array( 'code' => 'WrongPluginPass', 'info' => 'Same as "WrongPass", returned when an authentication plugin rather than MediaWiki itself rejected the password' ),
                        array( 'code' => 'CreateBlocked', 'info' => 'The wiki tried to automatically create a new account for you, but your IP address has been blocked from account creation' ),
                        array( 'code' => 'Throttled', 'info' => 'You\'ve logged in too many times in a short time' ),
index 2754bda..fae3377 100644 (file)
@@ -176,7 +176,7 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
        public function getDescription() {
                return array(
                        'Get a set of random pages',
-                       'NOTE: Pages are listed in a fixed sequence, only the starting point is random. This means that if, for example, "Main Page" is the first ',
+                       'NOTE: Pages are listed in a fixed sequence, only the starting point is random. This means that if, for example, "Main Page" is the first',
                        '      random page on your list, "List of fictional monkeys" will *always* be second, "List of people on stamps of Vanuatu" third, etc',
                        'NOTE: If the number of pages in the namespace is lower than rnlimit, you will get fewer pages. You will not get the same page twice'
                );