Porting my update to the maybeHelp() function in Maintenance.php into the trunk....
authorMark Clements <happydog@users.mediawiki.org>
Sun, 14 Mar 2010 11:38:18 +0000 (11:38 +0000)
committerMark Clements <happydog@users.mediawiki.org>
Sun, 14 Mar 2010 11:38:18 +0000 (11:38 +0000)
commit127bd2402825ee871bed6709d3a29ffb1f621179
tree32306347a519b4d826db762ac3377d184052df11
parentbbfa5d0d6c25dfe7c4b9cb13d54a2f3859dbde0a
Porting my update to the maybeHelp() function in Maintenance.php into the trunk.  This was accidentally committed to the 1.16 branch (rather than trunk, as intended) in r62955.  Here is the original commit message:

--------------------------
Update to the maybeHelp() function in Maintenance.php, to tidy the way help output is displayed on the command-line:

* Only display the file name as part of the command, rather than the full path to it (when the path is long it was virtually unreadable).
* Wrap the option/parameter descriptions so that they sit neatly on the screen.  Previously if a description ran to multiple lines it wrapped to column 1, possibly in the middle of a word. Now it wraps neatly and the subsequent lines are indented to make it clearer to read.

For now I have hard-coded the screen width to 80 characters, which is a sub-optimal solution.  However I do not know how to get the current screen-width in a system-agnostic way, so I will leave that detail for some-one else to flesh out.
--------------------------
maintenance/Maintenance.php