r114297 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114296‎ | r114297 | r114298 >
Date:19:23, 20 March 2012
Author:kipcool
Status:ok
Tags:
Comment:
Do not store IP for registered users
Modified paths:
  • /trunk/extensions/Wikidata/OmegaWiki/Transaction.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Wikidata/OmegaWiki/Transaction.php
@@ -185,7 +185,17 @@
186186 $dbr = wfGetDB( DB_MASTER );
187187 $timestamp = wfTimestampNow();
188188
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 );
190200 $updateTransactionId = $dbr->insertId();
191201 }
192202

Status & tagging log