00001 <?php 00002 00013 $options = array( 'help', 'update', 'noviews' ); 00014 require_once( 'commandLine.inc' ); 00015 echo( "Refresh Site Statistics\n\n" ); 00016 00017 if( isset( $options['help'] ) ) { 00018 showHelp(); 00019 exit(); 00020 } 00021 00022 require "$IP/maintenance/initStats.inc"; 00023 wfInitStats( $options ); 00024 00025 function showHelp() { 00026 echo( "Re-initialise the site statistics tables.\n\n" ); 00027 echo( "Usage: php initStats.php [--update|--noviews]\n\n" ); 00028 echo( " --update : Update the existing statistics (preserves the ss_total_views field)\n" ); 00029 echo( "--noviews : Don't update the page view counter\n\n" ); 00030 } 00031