Index: trunk/phase3/maintenance/initStats.php |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +require_once( 'commandLine.inc' ); |
| 5 | + |
| 6 | +$dbr =& wfGetDB( DB_SLAVE ); |
| 7 | + |
| 8 | +$edits = $dbr->selectField( 'revision', 'COUNT(rev_id)', '' ); |
| 9 | +$pages = $dbr->selectField( 'page', 'COUNT(page_id)', |
| 10 | + array( |
| 11 | + 'page_namespace' => 0, |
| 12 | + 'page_is_redirect' => 0, |
| 13 | + 'page_len > 0', |
| 14 | + ) |
| 15 | +); // HACK APPROXIMATION |
| 16 | + |
| 17 | +echo "$wgDBname: setting edits $edits, pages $pages\n"; |
| 18 | + |
| 19 | +$dbw =& wfGetDB( DB_MASTER ); |
| 20 | +$dbw->insert( 'site_stats', |
| 21 | + array( 'ss_row_id'=> 1, |
| 22 | + 'ss_total_views' => 0, |
| 23 | + 'ss_total_edits' => $edits, |
| 24 | + 'ss_good_articles' => $pages ) ); |
| 25 | + |
| 26 | +?> |
\ No newline at end of file |
Property changes on: trunk/phase3/maintenance/initStats.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 27 | + native |
Added: svn:keywords |
2 | 28 | + Author Date Id Revision |