From 8263743db1106db6792e0a8f889db1b5f1432e6f Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 12 Mar 2012 21:17:23 +0000 Subject: [PATCH] Revert r113650 and reapply r113619 and r113649 with one modification: User::createNew() was missing a DatabaseBase::timestamp() call --- includes/User.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/User.php b/includes/User.php index b0b26ef77a..fd17f2449d 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2880,6 +2880,7 @@ class User { 'user_token' => $user->mToken, 'user_registration' => $dbw->timestamp( $user->mRegistration ), 'user_editcount' => 0, + 'user_touched' => $dbw->timestamp( self::newTouchedTimestamp() ), ); foreach ( $params as $name => $value ) { $fields["user_$name"] = $value; @@ -2898,6 +2899,9 @@ class User { */ public function addToDatabase() { $this->load(); + + $this->mTouched = self::newTouchedTimestamp(); + $dbw = wfGetDB( DB_MASTER ); $seqVal = $dbw->nextSequenceValue( 'user_user_id_seq' ); $dbw->insert( 'user', @@ -2913,6 +2917,7 @@ class User { 'user_token' => $this->mToken, 'user_registration' => $dbw->timestamp( $this->mRegistration ), 'user_editcount' => 0, + 'user_touched' => $dbw->timestamp( $this->mTouched ), ), __METHOD__ ); $this->mId = $dbw->insertId(); -- 2.20.1