r54797 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r54796‎ | r54797 | r54798 >
Date:18:08, 11 August 2009
Author:brion
Status:deferred
Tags:
Comment:
Committing Tim's live hack to fix counts
Modified paths:
  • /trunk/extensions/SecurePoll/cli/wm-scripts/voterList-bv2009.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SecurePoll/cli/wm-scripts/voterList-bv2009.php
@@ -4,13 +4,14 @@
55 $dbr = wfGetDB( DB_SLAVE );
66 $dbw = wfGetDB( DB_MASTER );
77 $fname = 'voterList-bv2009.php';
 8+$listName = 'board-vote-2009-amended';
89
910 if ( !$wgCentralAuthDatabase ) {
1011 echo wfWikiID() . ": CentralAuth not active, skipping\n";
1112 exit( 0 );
1213 }
1314
14 -$dbw->delete( 'securepoll_lists', array( 'li_name' => 'board-vote-2009' ), $fname );
 15+$dbw->delete( 'securepoll_lists', array( 'li_name' => $listName ), $fname );
1516
1617 $userId = 0;
1718 $numQualified = 0;
@@ -32,7 +33,7 @@
3334 $insertBatch = array();
3435 foreach ( $qualifieds as $id => $name ) {
3536 $insertBatch[] = array(
36 - 'li_name' => 'board-vote-2009',
 37+ 'li_name' => $listName,
3738 'li_member' => $id
3839 );
3940 }
@@ -74,6 +75,7 @@
7576 $attached = array_diff( $attached, $nonLocalUsers );
7677
7778 # Check all global accounts
 79+ $localWiki = wfWikiID();
7880 if ( $attached ) {
7981 $res = $dbc->select( 'localuser',
8082 array( 'lu_name', 'lu_wiki' ),
@@ -81,7 +83,9 @@
8284 __METHOD__ );
8385 $foreignUsers = array();
8486 foreach ( $res as $row ) {
85 - $foreignUsers[$row->lu_wiki][] = $row->lu_name;
 87+ if ( $row->lu_wiki != $localWiki ) {
 88+ $foreignUsers[$row->lu_wiki][] = $row->lu_name;
 89+ }
8690 }
8791
8892 foreach ( $foreignUsers as $wiki => $wikiUsers ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r54798r54797 from trunkbrion18:10, 11 August 2009

Status & tagging log