From 55ebd95afd26d77d3c18e0d9a6918bd850f60521 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 22 Dec 2010 21:40:33 +0000 Subject: [PATCH] * (bug 24287) Wrap/similar on api help output --- RELEASE-NOTES | 1 + includes/api/ApiBase.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f6415624d3..7500f7caca 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -45,6 +45,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 26339) Throw warning when truncating an overlarge API result * (bug 14869) Add API module for accessing QueryPage-based special pages * (bug 14020) API for Special:Unwatchedpages +* (bug 24287) Wrap/similar on api help output === Languages updated in 1.18 === diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index 4637c93821..ce45d6c23d 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -336,7 +336,9 @@ abstract class ApiBase { $choices[] = $t; } } - $desc .= $paramPrefix . $nothingPrompt . $prompt . implode( ', ', $choices ); + $desc .= $paramPrefix . $nothingPrompt . $prompt; + $choicesstring = implode( ', ', $choices ); + $desc .= wordwrap( $choicesstring, 100, "\n " ); } else { switch ( $type ) { case 'namespace': -- 2.20.1