Index: trunk/extensions/MarkAsHelpful/includes/MarkAsHelpfulItem.php |
— | — | @@ -264,8 +264,10 @@ |
265 | 265 | if ( $user ) { |
266 | 266 | if ( $user->isAnon() ) { |
267 | 267 | $conds['mah_user_ip'] = $user->getName(); |
| 268 | + $conds['mah_user_id'] = 0; |
268 | 269 | } else { |
269 | 270 | $conds['mah_user_id'] = $user->getId(); |
| 271 | + $conds[] = 'mah_user_ip IS NULL'; |
270 | 272 | } |
271 | 273 | } else { |
272 | 274 | // Invalid User object, we can't treat this user has marked an item |