Language object cache, for faster wfMsg() performance with unusual languages, and...
[mediawiki.git] / maintenance / refreshImageCount.php
blob14f842b950e6c7ceec5c04b34ece71c06045928f
1 <?php
2 /**
3 * Quickie hack; patch-ss_images.sql uses variables which don't
4 * replicate properly.
6 * @file
7 * @ingroup Maintenance
8 */
10 require_once( "commandLine.inc" );
12 $dbw = wfGetDB( DB_MASTER );
14 // Load the current value from the master
15 $count = $dbw->selectField( 'site_stats', 'ss_images' );
17 echo wfWikiID().": forcing ss_images to $count\n";
19 // First set to NULL so that it changes on the master
20 $dbw->update( 'site_stats',
21 array( 'ss_images' => null ),
22 array( 'ss_row_id' => 1 ) );
24 // Now this update will be forced to go out
25 $dbw->update( 'site_stats',
26 array( 'ss_images' => $count ),
27 array( 'ss_row_id' => 1 ) );