Index: trunk/extensions/Wikidata/OmegaWiki/Transaction.php |
— | — | @@ -185,7 +185,17 @@ |
186 | 186 | $dbr = wfGetDB( DB_MASTER ); |
187 | 187 | $timestamp = wfTimestampNow(); |
188 | 188 | |
189 | | - $dbr->query( "INSERT INTO {$dc}_transactions (user_id, user_ip, timestamp, comment) VALUES (" . $userID . ', ' . $dbr->addQuotes( $userIP ) . ', ' . $timestamp . ', ' . $dbr->addQuotes( $comment ) . ')' ); |
| 189 | + |
| 190 | + // do not store IP for logged in users |
| 191 | + if ( $userID > 0 ) { |
| 192 | + $userIP = ""; |
| 193 | + } |
| 194 | + |
| 195 | + $sql = "INSERT INTO {$dc}_transactions (user_id, user_ip, timestamp, comment) " |
| 196 | + . "VALUES (" . $userID . ", " . $dbr->addQuotes( $userIP ) |
| 197 | + . ', ' . $timestamp . ', ' . $dbr->addQuotes( $comment ) . ')' ; |
| 198 | + |
| 199 | + $dbr->query( $sql ); |
190 | 200 | $updateTransactionId = $dbr->insertId(); |
191 | 201 | } |
192 | 202 | |