Revert r113650 and reapply r113619 and r113649 with one modification: User::createNew...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 12 Mar 2012 21:17:23 +0000 (21:17 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 12 Mar 2012 21:17:23 +0000 (21:17 +0000)
includes/User.php

index b0b26ef..fd17f24 100644 (file)
@@ -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();