Index: trunk/extensions/CentralAuth/TestPlugin.php |
— | — | @@ -230,6 +230,12 @@ |
231 | 231 | function attemptAutoMigration( $password='' ) { |
232 | 232 | $rows = $this->fetchUnattached(); |
233 | 233 | |
| 234 | + if( !$rows ) { |
| 235 | + wfDebugLog( 'CentralAuth', |
| 236 | + "Attempted migration with no unattahced for '$this->mName'" ); |
| 237 | + return false; |
| 238 | + } |
| 239 | + |
234 | 240 | $winner = false; |
235 | 241 | $max = -1; |
236 | 242 | $attach = array(); |
— | — | @@ -503,6 +509,7 @@ |
504 | 510 | 'lu_attached' => 0, |
505 | 511 | ), |
506 | 512 | __METHOD__ ); |
| 513 | + $rows = array(); |
507 | 514 | while( $row = $dbw->fetchObject( $result ) ) { |
508 | 515 | $rows[] = $row; |
509 | 516 | } |
Index: trunk/extensions/CentralAuth/migratePass0.php |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | // * generate 'globaluser' entries for each username |
8 | 8 | // --> enable |
9 | 9 | |
10 | | -require_once 'commandLine.inc'; |
| 10 | +require '../../maintenance/commandLine.inc'; |
11 | 11 | |
12 | 12 | |
13 | 13 | /** |
Index: trunk/extensions/CentralAuth/migratePass1.php |
— | — | @@ -3,7 +3,7 @@ |
4 | 4 | // pass 1: go through all usernames in 'localuser' and create 'globaluser' rows |
5 | 5 | // for those that can be automatically migrated, go ahead and do it. |
6 | 6 | |
7 | | -require_once 'commandLine.inc'; |
| 7 | +require '../../maintenance/commandLine.inc'; |
8 | 8 | |
9 | 9 | function migratePassOne() { |
10 | 10 | $dbBackground = wfGetDB( DB_SLAVE, 'CentralAuth' ); // fixme for large dbs |