From: Brion Vibber Date: Tue, 28 Mar 2006 21:56:12 +0000 (+0000) Subject: First set to NULL so that it changes on the master X-Git-Tag: 1.6.0~89 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=7e9892f14dffbbdb5347a8f382ab0423e7281340;p=lhc%2Fweb%2Fwiklou.git First set to NULL so that it changes on the master --- diff --git a/maintenance/refreshImageCount.php b/maintenance/refreshImageCount.php index 797ceddc61..15ce2b91a0 100644 --- a/maintenance/refreshImageCount.php +++ b/maintenance/refreshImageCount.php @@ -6,9 +6,18 @@ require_once( "commandLine.inc" ); $dbw =& wfGetDB( DB_MASTER ); -$count = $dbw->selectField( 'image', 'COUNT(*)' ); -echo "$wgDBname: setting ss_images to $count\n"; +// Load the current value from the master +$count = $dbw->selectField( 'site_stats', 'ss_images' ); + +echo "$wgDBname: forcing ss_images to $count\n"; + +// First set to NULL so that it changes on the master +$dbw->update( 'site_stats', + array( 'ss_images' => null ), + array( 'ss_row_id' => 1 ) ); + +// Now this update will be forced to go out $dbw->update( 'site_stats', array( 'ss_images' => $count ), array( 'ss_row_id' => 1 ) );