r113668 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113667‎ | r113668 | r113669 >
Date:21:17, 12 March 2012
Author:ialex
Status:ok
Tags:
Comment:
Revert r113650 and reapply r113619 and r113649 with one modification: User::createNew() was missing a DatabaseBase::timestamp() call
Modified paths:
  • /trunk/phase3/includes/User.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/User.php
@@ -2880,6 +2880,7 @@
28812881 'user_token' => $user->mToken,
28822882 'user_registration' => $dbw->timestamp( $user->mRegistration ),
28832883 'user_editcount' => 0,
 2884+ 'user_touched' => $dbw->timestamp( self::newTouchedTimestamp() ),
28842885 );
28852886 foreach ( $params as $name => $value ) {
28862887 $fields["user_$name"] = $value;
@@ -2898,6 +2899,9 @@
28992900 */
29002901 public function addToDatabase() {
29012902 $this->load();
 2903+
 2904+ $this->mTouched = self::newTouchedTimestamp();
 2905+
29022906 $dbw = wfGetDB( DB_MASTER );
29032907 $seqVal = $dbw->nextSequenceValue( 'user_user_id_seq' );
29042908 $dbw->insert( 'user',
@@ -2913,6 +2917,7 @@
29142918 'user_token' => $this->mToken,
29152919 'user_registration' => $dbw->timestamp( $this->mRegistration ),
29162920 'user_editcount' => 0,
 2921+ 'user_touched' => $dbw->timestamp( $this->mTouched ),
29172922 ), __METHOD__
29182923 );
29192924 $this->mId = $dbw->insertId();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113619Set the user_touched field directly when adding a new user to the database so...ialex13:07, 12 March 2012
r113649Fix r113619: Convert timestamp to the backend database valuesaper19:35, 12 March 2012
r113650Revert r113619, r113649: Breaks unit tests...saper19:58, 12 March 2012

Status & tagging log