Remove ?>'s from files. They're pointless, and just asking for people to mess with...
[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 require_once( "commandLine.inc" );
7
8 $dbw = wfGetDB( DB_MASTER );
9
10 // Load the current value from the master
11 $count = $dbw->selectField( 'site_stats', 'ss_images' );
12
13 echo wfWikiID().": forcing ss_images to $count\n";
14
15 // First set to NULL so that it changes on the master
16 $dbw->update( 'site_stats',
17 array( 'ss_images' => null ),
18 array( 'ss_row_id' => 1 ) );
19
20 // Now this update will be forced to go out
21 $dbw->update( 'site_stats',
22 array( 'ss_images' => $count ),
23 array( 'ss_row_id' => 1 ) );
24
25