Index: branches/wmf/1.19wmf1/extensions/AntiSpoof/SpoofUser.php |
— | — | @@ -43,6 +43,20 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
| 47 | + * @return string |
| 48 | + */ |
| 49 | + protected function getTableName() { |
| 50 | + return 'user'; |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @return string |
| 55 | + */ |
| 56 | + protected function getUserColumn() { |
| 57 | + return 'user_name'; |
| 58 | + } |
| 59 | + |
| 60 | + /** |
47 | 61 | * Does the username pass Unicode legality and script-mixing checks? |
48 | 62 | * |
49 | 63 | * @return array empty if no conflict, or array containing conflicting usernames |
— | — | @@ -53,11 +67,11 @@ |
54 | 68 | // Join against the user table to ensure that we skip stray |
55 | 69 | // entries left after an account is renamed or otherwise munged. |
56 | 70 | $spoofedUsers = $dbr->select( |
57 | | - array( 'spoofuser', 'user' ), |
58 | | - array( 'user_name' ), |
| 71 | + array( 'spoofuser', $this->getTableName() ), |
| 72 | + array( 'su_name' ), // Same thing due to the join. Saves extra variableness |
59 | 73 | array( |
60 | 74 | 'su_normalized' => $this->mNormalized, |
61 | | - 'su_name=user_name', |
| 75 | + 'su_name = ' . $this->getUserColumn(), |
62 | 76 | ), |
63 | 77 | __METHOD__, |
64 | 78 | array( |
— | — | @@ -66,7 +80,7 @@ |
67 | 81 | |
68 | 82 | $spoofs = array(); |
69 | 83 | foreach ( $spoofedUsers as $row ) { |
70 | | - array_push( $spoofs, $row->user_name ); |
| 84 | + array_push( $spoofs, $row->su_name ); |
71 | 85 | } |
72 | 86 | return $spoofs; |
73 | 87 | } |
Index: branches/wmf/1.19wmf1/extensions/CentralAuth/AntiSpoof/CentralAuthSpoofUser.php |
— | — | @@ -14,4 +14,18 @@ |
15 | 15 | protected static function getDBMaster() { |
16 | 16 | return CentralAuthUser::getCentralDB(); |
17 | 17 | } |
| 18 | + |
| 19 | + /** |
| 20 | + * @return string |
| 21 | + */ |
| 22 | + protected function getTableName() { |
| 23 | + return 'globaluser'; |
| 24 | + } |
| 25 | + |
| 26 | + /** |
| 27 | + * @return string |
| 28 | + */ |
| 29 | + protected function getUserColumn() { |
| 30 | + return 'gu_name'; |
| 31 | + } |
18 | 32 | } |
Property changes on: branches/wmf/1.19wmf1/extensions |
___________________________________________________________________ |
Modified: svn:mergeinfo |
19 | 33 | Merged /trunk/extensions:r111814 |