r27847 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r27846‎ | r27847 | r27848 >
Date:14:28, 26 November 2007
Author:tstarling
Status:old
Tags:
Comment:
clean up --help feature
Modified paths:
  • /trunk/phase3/maintenance/dumpHTML.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpHTML.php
@@ -4,10 +4,8 @@
55 * @addtogroup Maintenance
66 */
77
8 -function ShowUsage() {
9 -echo <<<END
 8+$usage = <<<ENDS
109 Usage:
11 -php dumpHTML.php --help
1210 php dumpHTML.php [options...]
1311
1412 --help show this message
@@ -31,8 +29,7 @@
3230 --compress generate compressed version of the html pages
3331 --udp-profile <N> profile 1/N rendering operations using ProfilerSimpleUDP
3432
35 -END;
36 -}
 33+ENDS;
3734
3835 $optionsWithArgs = array( 's', 'd', 'e', 'k', 'checkpoint', 'slice', 'udp-profile' );
3936 $options = array( 'help' );
@@ -58,8 +55,8 @@
5956 error_reporting( E_ALL & (~E_NOTICE) );
6057
6158 if( isset( $options['help'] ) ) {
62 - ShowUsage();
63 - exit();
 59+ echo $usage;
 60+ exit;
6461 }
6562
6663 if ( !empty( $options['s'] ) ) {

Status & tagging log