From 40f33eb66375d9ee10e07d1f78621dc4cc29ee4d Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 23 Apr 2011 13:29:11 +0000 Subject: [PATCH] Add some more spacing due to long parameter names Use str_repeat for ease rather than " " etc Fix MiserMode to MiserMode --- includes/api/ApiBase.php | 7 ++++--- includes/api/ApiQueryLogEvents.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 5e9419f848..4ba17a79fa 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -293,7 +293,8 @@ abstract class ApiBase { $paramsDescription = $this->getFinalParamDescription(); $msg = ''; - $paramPrefix = "\n" . str_repeat( ' ', 19 ); + $paramPrefix = "\n" . str_repeat( ' ', 24 ); + $descWordwrap = "\n" . str_repeat( ' ', 28 ); foreach ( $params as $paramName => $paramSettings ) { $desc = isset( $paramsDescription[$paramName] ) ? $paramsDescription[$paramName] : ''; if ( is_array( $desc ) ) { @@ -338,7 +339,7 @@ abstract class ApiBase { } $desc .= $paramPrefix . $nothingPrompt . $prompt; $choicesstring = implode( ', ', $choices ); - $desc .= wordwrap( $choicesstring, 100, "\n " ); + $desc .= wordwrap( $choicesstring, 100, $descWordwrap ); } else { switch ( $type ) { case 'namespace': @@ -388,7 +389,7 @@ abstract class ApiBase { $desc .= $paramPrefix . "Default: $default"; } - $msg .= sprintf( " %-14s - %s\n", $this->encodeParamName( $paramName ), $desc ); + $msg .= sprintf( " %-19s - %s\n", $this->encodeParamName( $paramName ), $desc ); } return $msg; diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 2e51c3f65e..8cb9b6b4a1 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -422,7 +422,7 @@ class ApiQueryLogEvents extends ApiQueryBase { 'dir' => $this->getDirectionDescription( $p ), 'user' => 'Filter entries to those made by the given user', 'title' => 'Filter entries to those related to a page', - 'prefix' => 'Filter entries that start with this prefix. Disabled in MiserMode', + 'prefix' => 'Filter entries that start with this prefix. Disabled in Miser Mode', 'limit' => 'How many total event entries to return', 'tag' => 'Only list event entries tagged with this tag', ); -- 2.20.1