Improve RELEASE-NOTES wording from r52082
[lhc/web/wiklou.git] / maintenance / initStats.php
1 <?php
2
3 /**
4 * Maintenance script to re-initialise or update the site statistics table
5 *
6 * @file
7 * @ingroup Maintenance
8 * @author Brion Vibber
9 * @author Rob Church <robchur@gmail.com>
10 * @licence GNU General Public Licence 2.0 or later
11 */
12
13 $options = array( 'help', 'update', 'noviews' );
14 require_once( 'commandLine.inc' );
15 echo( "Refresh Site Statistics\n\n" );
16
17 if( isset( $options['help'] ) ) {
18 showHelp();
19 exit(1);
20 }
21
22 require "$IP/maintenance/initStats.inc";
23 wfInitStats( $options );
24
25 function showHelp() {
26 echo( "Re-initialise the site statistics tables.\n\n" );
27 echo( "Usage: php initStats.php [--update|--noviews]\n\n" );
28 echo( " --update : Update the existing statistics (preserves the ss_total_views field)\n" );
29 echo( "--noviews : Don't update the page view counter\n\n" );
30 }
31