initSiteStats.php: Make it obvious you need to use --update
authorKunal Mehta <legoktm@member.fsf.org>
Tue, 8 Mar 2016 19:11:06 +0000 (11:11 -0800)
committerKunal Mehta <legoktm@member.fsf.org>
Tue, 8 Mar 2016 19:11:06 +0000 (11:11 -0800)
Otherwise people will run the script a few times and be totally confused
as to why their statistics aren't being saved. The wording is taken from
updateArticleCount.php, which has a similar parameter.

Change-Id: I802553120c1bf4d8f6234ccced5f19ecd5cd9b66

maintenance/initSiteStats.php

index 7e62b89..b2530ce 100644 (file)
@@ -63,6 +63,9 @@ class InitSiteStats extends Maintenance {
                        $this->output( "\nUpdating site statistics..." );
                        $counter->refresh();
                        $this->output( "done.\n" );
+               } else {
+                       $this->output( "\nTo update the site statistics table, run the script "
+                               . "with the --update option.\n" );
                }
 
                if ( $this->hasOption( 'active' ) ) {