* And unbreak, rebuildLanguage should really be fixed
[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 * @addtogroup Maintenance
7 * @author Brion Vibber
8 * @author Rob Church <robchur@gmail.com>
9 * @licence GNU General Public Licence 2.0 or later
10 */
11
12 $options = array( 'help', 'update', 'noviews' );
13 require_once( 'commandLine.inc' );
14 echo( "Refresh Site Statistics\n\n" );
15
16 if( isset( $options['help'] ) ) {
17 showHelp();
18 exit();
19 }
20
21 require "$IP/maintenance/initStats.inc";
22 wfInitStats( $options );
23
24 function showHelp() {
25 echo( "Re-initialise the site statistics tables.\n\n" );
26 echo( "Usage: php initStats.php [--update|--noviews]\n\n" );
27 echo( " --update : Update the existing statistics (preserves the ss_total_views field)\n" );
28 echo( "--noviews : Don't update the page view counter\n\n" );
29 }
30