From fff417fb7465cc7aef22de29b904fbb632133276 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Mon, 1 May 2006 15:57:22 +0000 Subject: [PATCH] Add help --- maintenance/initStats.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/maintenance/initStats.php b/maintenance/initStats.php index 0fd881f175..fb5603d331 100644 --- a/maintenance/initStats.php +++ b/maintenance/initStats.php @@ -16,6 +16,11 @@ echo( "Refresh Site Statistics\n\n" ); $dbr =& wfGetDB( DB_SLAVE ); $fname = 'initStats'; +if( isset( $options['help'] ) { + showHelp(); + exit(); +} + echo( "Counting total edits..." ); $edits = $dbr->selectField( 'revision', 'COUNT(*)', '', $fname ); echo( "{$edits}\nCounting number of articles..." ); @@ -54,4 +59,10 @@ if( isset( $options['update'] ) ) { echo( "done.\n\n" ); +function showHelp() { + echo( "Re-initialise the site statistics tables.\n\n" ); + echo( "Usage: php initStats.php [--update]\n\n" ); + echo( "--update : Update the existing statistics (preserves the ss_total_views field)\n\n" ); +} + ?> \ No newline at end of file -- 2.20.1