Index: trunk/extensions/FlaggedRevs/specialpages/ReaderFeedback_body.php |
— | — | @@ -259,6 +259,10 @@ |
260 | 260 | if( !$rev || !$rev->getTitle()->equals( $this->page ) ) { |
261 | 261 | return false; // opps! |
262 | 262 | } |
| 263 | + $ip = wfGetIP(); |
| 264 | + if( !$wgUser->getId() && !$ip ) { |
| 265 | + return false; // we need to keep track somehow |
| 266 | + } |
263 | 267 | $article = new Article( $this->page ); |
264 | 268 | # Check if user already voted before... |
265 | 269 | if( self::userAlreadyVoted( $this->page, $this->oldid ) ) { |
— | — | @@ -268,7 +272,7 @@ |
269 | 273 | $insertRow = array( |
270 | 274 | 'rfb_rev_id' => $this->oldid, |
271 | 275 | 'rfb_user' => $wgUser->getId(), |
272 | | - 'rfb_ip' => wfGetIP(), |
| 276 | + 'rfb_ip' => $ip, |
273 | 277 | 'rfb_timestamp' => $dbw->timestamp(), |
274 | 278 | 'rfb_ratings' => $ratings |
275 | 279 | ); |