TTO has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/132926

Change subject: Fix initSiteStats.php maintenance script
......................................................................

Fix initSiteStats.php maintenance script

It appears not to have worked for some time, as it either calls a protected
function ($counter->refresh()) or an undefined function
($counter->update()) depending on the parameters specified.

Bug: 65214
Change-Id: Ia7d867792b84c98714ec6dbbfef09745e875c8bc
---
M maintenance/initSiteStats.php
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/132926/1

diff --git a/maintenance/initSiteStats.php b/maintenance/initSiteStats.php
index c368c3f..88b2557 100644
--- a/maintenance/initSiteStats.php
+++ b/maintenance/initSiteStats.php
@@ -75,12 +75,13 @@
                        $this->output( "{$active}\n" );
                }
 
-               $this->output( "\nUpdating site statistics..." );
-
                if ( $this->hasOption( 'update' ) ) {
-                       $counter->update();
-               } else {
-                       $counter->refresh();
+                       $this->output( "\nUpdating site statistics..." );
+                       $options = array(
+                               'activeUsers' => $this->hasOption( 'active' ),
+                               'views' => !$this->hasOption( 'noviews' ),
+                       );
+                       $counter->doAllAndCommit( $this->hasOption( 
'use-master' ), $options );
                }
 
                $this->output( "done.\n" );

-- 
To view, visit https://gerrit.wikimedia.org/r/132926
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7d867792b84c98714ec6dbbfef09745e875c8bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TTO <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to