From 50b88a5b1b62829b211224cb128e014c7a1fa7d7 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Tue, 25 May 2010 20:46:09 +0000 Subject: [PATCH] Remove arrays from getDescription where we are only using 1 line --- includes/api/ApiBlock.php | 4 +--- includes/api/ApiDelete.php | 4 +--- includes/api/ApiDisabled.php | 4 +--- includes/api/ApiEmailUser.php | 4 +--- includes/api/ApiGo.php | 4 +--- includes/api/ApiHelp.php | 4 +--- includes/api/ApiImport.php | 4 +--- includes/api/ApiLogout.php | 4 +--- includes/api/ApiMove.php | 4 +--- includes/api/ApiPatrol.php | 4 +--- includes/api/ApiProtect.php | 4 +--- includes/api/ApiPurge.php | 4 +--- includes/api/ApiQueryImageInfo.php | 4 +--- includes/api/ApiUnblock.php | 4 +--- includes/api/ApiUserrights.php | 4 +--- includes/api/ApiWatch.php | 4 +--- 16 files changed, 16 insertions(+), 48 deletions(-) diff --git a/includes/api/ApiBlock.php b/includes/api/ApiBlock.php index d0b0095200..e26f52822e 100644 --- a/includes/api/ApiBlock.php +++ b/includes/api/ApiBlock.php @@ -168,9 +168,7 @@ class ApiBlock extends ApiBase { } public function getDescription() { - return array( - 'Block a user' - ); + return 'Block a user'; } public function getPossibleErrors() { diff --git a/includes/api/ApiDelete.php b/includes/api/ApiDelete.php index 2dfd176ad4..8737eff683 100644 --- a/includes/api/ApiDelete.php +++ b/includes/api/ApiDelete.php @@ -235,9 +235,7 @@ class ApiDelete extends ApiBase { } public function getDescription() { - return array( - 'Delete a page' - ); + return 'Delete a page'; } public function getPossibleErrors() { diff --git a/includes/api/ApiDisabled.php b/includes/api/ApiDisabled.php index 3845486894..d2468ca049 100644 --- a/includes/api/ApiDisabled.php +++ b/includes/api/ApiDisabled.php @@ -60,9 +60,7 @@ class ApiDisabled extends ApiBase { } public function getDescription() { - return array( - 'This module has been disabled' - ); + return 'This module has been disabled'; } protected function getExamples() { diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php index 3dd607cb65..159c38b036 100644 --- a/includes/api/ApiEmailUser.php +++ b/includes/api/ApiEmailUser.php @@ -109,9 +109,7 @@ class ApiEmailUser extends ApiBase { } public function getDescription() { - return array( - 'Email a user.' - ); + return 'Email a user.'; } public function getPossibleErrors() { diff --git a/includes/api/ApiGo.php b/includes/api/ApiGo.php index 9ce0c49476..34592ad7af 100644 --- a/includes/api/ApiGo.php +++ b/includes/api/ApiGo.php @@ -74,9 +74,7 @@ class ApiGo extends ApiBase { } public function getDescription() { - return array( - 'Determine the title one will be taken to by a "Go" search, if any' - ); + return 'Determine the title one will be taken to by a "Go" search, if any'; } public function getPossibleErrors() { diff --git a/includes/api/ApiHelp.php b/includes/api/ApiHelp.php index d16fd29a96..d5f13e156f 100644 --- a/includes/api/ApiHelp.php +++ b/includes/api/ApiHelp.php @@ -130,9 +130,7 @@ class ApiHelp extends ApiBase { } public function getDescription() { - return array( - 'Display this help screen. Or the help screen for the specified module' - ); + return 'Display this help screen. Or the help screen for the specified module'; } protected function getExamples() { diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php index 2b6fe5b31a..aecaea609e 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -141,9 +141,7 @@ class ApiImport extends ApiBase { } public function getDescription() { - return array( - 'Import a page from another wiki, or an XML file' - ); + return 'Import a page from another wiki, or an XML file'; } public function getPossibleErrors() { diff --git a/includes/api/ApiLogout.php b/includes/api/ApiLogout.php index 4eacb07815..8939104ee8 100644 --- a/includes/api/ApiLogout.php +++ b/includes/api/ApiLogout.php @@ -63,9 +63,7 @@ class ApiLogout extends ApiBase { } public function getDescription() { - return array( - 'This module is used to logout and clear session data' - ); + return 'This module is used to logout and clear session data'; } protected function getExamples() { diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php index 442feaaadd..5f6c8754fd 100644 --- a/includes/api/ApiMove.php +++ b/includes/api/ApiMove.php @@ -221,9 +221,7 @@ class ApiMove extends ApiBase { } public function getDescription() { - return array( - 'Move a page' - ); + return 'Move a page'; } public function getPossibleErrors() { diff --git a/includes/api/ApiPatrol.php b/includes/api/ApiPatrol.php index dc246ef5a5..d4d519a647 100644 --- a/includes/api/ApiPatrol.php +++ b/includes/api/ApiPatrol.php @@ -83,9 +83,7 @@ class ApiPatrol extends ApiBase { } public function getDescription() { - return array( - 'Patrol a page or revision' - ); + return 'Patrol a page or revision'; } public function getPossibleErrors() { diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php index 6c43b4623e..0dfa6a99f3 100644 --- a/includes/api/ApiProtect.php +++ b/includes/api/ApiProtect.php @@ -193,9 +193,7 @@ class ApiProtect extends ApiBase { } public function getDescription() { - return array( - 'Change the protection level of a page' - ); + return 'Change the protection level of a page'; } public function getPossibleErrors() { diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php index 18e3299d9d..8cd8b604c4 100644 --- a/includes/api/ApiPurge.php +++ b/includes/api/ApiPurge.php @@ -98,9 +98,7 @@ class ApiPurge extends ApiBase { } public function getDescription() { - return array( - 'Purge the cache for the given titles' - ); + return 'Purge the cache for the given titles'; } public function getPossibleErrors() { diff --git a/includes/api/ApiQueryImageInfo.php b/includes/api/ApiQueryImageInfo.php index 2ebc508dc0..2d58003fb4 100644 --- a/includes/api/ApiQueryImageInfo.php +++ b/includes/api/ApiQueryImageInfo.php @@ -332,9 +332,7 @@ class ApiQueryImageInfo extends ApiQueryBase { } public function getDescription() { - return array( - 'Returns image information and upload history' - ); + return 'Returns image information and upload history'; } public function getPossibleErrors() { diff --git a/includes/api/ApiUnblock.php b/includes/api/ApiUnblock.php index f146075d6a..31d0beff3d 100644 --- a/includes/api/ApiUnblock.php +++ b/includes/api/ApiUnblock.php @@ -114,9 +114,7 @@ class ApiUnblock extends ApiBase { } public function getDescription() { - return array( - 'Unblock a user' - ); + return 'Unblock a user'; } public function getPossibleErrors() { diff --git a/includes/api/ApiUserrights.php b/includes/api/ApiUserrights.php index 9686217e50..9d74cf3bb0 100644 --- a/includes/api/ApiUserrights.php +++ b/includes/api/ApiUserrights.php @@ -115,9 +115,7 @@ class ApiUserrights extends ApiBase { } public function getDescription() { - return array( - 'Add/remove a user to/from groups', - ); + return 'Add/remove a user to/from groups'; } public function getPossibleErrors() { diff --git a/includes/api/ApiWatch.php b/includes/api/ApiWatch.php index 60c95d0a6a..e9db6980b3 100644 --- a/includes/api/ApiWatch.php +++ b/includes/api/ApiWatch.php @@ -89,9 +89,7 @@ class ApiWatch extends ApiBase { } public function getDescription() { - return array( - 'Add or remove a page from/to the current user\'s watchlist' - ); + return 'Add or remove a page from/to the current user\'s watchlist'; } public function getPossibleErrors() { -- 2.20.1