From: Alexandre Emsenhuber Date: Mon, 12 Mar 2012 21:17:23 +0000 (+0000) Subject: Revert r113650 and reapply r113619 and r113649 with one modification: User::createNew... X-Git-Tag: 1.31.0-rc.0~24283 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=8263743db1106db6792e0a8f889db1b5f1432e6f;p=lhc%2Fweb%2Fwiklou.git Revert r113650 and reapply r113619 and r113649 with one modification: User::createNew() was missing a DatabaseBase::timestamp() call --- 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();