* add uniwiki/CreatePage extension to core
[lhc/web/wiklou.git] / maintenance / refreshImageCount.php
1 <?php
2 /**
3 * Quickie hack; patch-ss_images.sql uses variables which don't
4 * replicate properly.
5 *
6 * @file
7 * @ingroup Maintenance
8 */
9
10 require_once( "commandLine.inc" );
11
12 $dbw = wfGetDB( DB_MASTER );
13
14 // Load the current value from the master
15 $count = $dbw->selectField( 'site_stats', 'ss_images' );
16
17 echo wfWikiID().": forcing ss_images to $count\n";
18
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 ) );
23
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 ) );
28
29