From: Rob Church Date: Mon, 1 May 2006 15:57:22 +0000 (+0000) Subject: Add help X-Git-Tag: 1.31.0-rc.0~57288 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=fff417fb7465cc7aef22de29b904fbb632133276;p=lhc%2Fweb%2Fwiklou.git Add help --- 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