From: Domas Mituzas Date: Wed, 5 Jan 2005 14:06:00 +0000 (+0000) Subject: not too many of enotif errors or cleanup involved here, just unbreaking wiki X-Git-Tag: 1.5.0alpha1~994 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=feba73feb16f5ad65ed7478eba1380b72ce666b6;p=lhc%2Fweb%2Fwiklou.git not too many of enotif errors or cleanup involved here, just unbreaking wiki * do not update watchlist table on every anon hit * use database timestamps instead of '0'es, will obviously break some parts of enotif *shrug* --- diff --git a/includes/User.php b/includes/User.php index a2772392d6..c1cfa84a74 100644 --- a/includes/User.php +++ b/includes/User.php @@ -411,7 +411,7 @@ class User { if ( $s !== false ) { $this->mName = $s->user_name; $this->mEmail = $s->user_email; - $this->mEmailAuthenticationtimestamp = $s->user_emailauthenticationtimestamp; + $this->mEmailAuthenticationtimestamp = wfTimestamp(TS_MW,$s->user_emailauthenticationtimestamp); $this->mRealName = $s->user_real_name; $this->mPassword = $s->user_password; $this->mNewpassword = $s->user_newpassword; @@ -810,10 +810,13 @@ class User { * the next change of the page if it's watched etc. */ function clearNotification( $title ) { + $userid = $this->getId(); + if ($userid==0) + return; $dbw =& wfGetDB( DB_MASTER ); $success = $dbw->update( 'watchlist', array( /* SET */ - 'wl_notificationtimestamp' => 0 + 'wl_notificationtimestamp' => $dbw->timestamp(0) ), array( /* WHERE */ 'wl_title' => $title->getDBkey(), 'wl_namespace' => $title->getNamespace(), @@ -940,7 +943,7 @@ class User { 'user_newpassword' => $this->mNewpassword, 'user_real_name' => $this->mRealName, 'user_email' => $this->mEmail, - 'user_emailauthenticationtimestamp' => $this->mEmailAuthenticationtimestamp, + 'user_emailauthenticationtimestamp' => $dbw->timestamp($this->mEmailAuthenticationtimestamp), 'user_options' => $this->encodeOptions(), 'user_touched' => $dbw->timestamp($this->mTouched), 'user_token' => $this->mToken @@ -1000,7 +1003,7 @@ class User { 'user_password' => $this->mPassword, 'user_newpassword' => $this->mNewpassword, 'user_email' => $this->mEmail, - 'user_emailauthenticationtimestamp' => $this->mEmailAuthenticationtimestamp, + 'user_emailauthenticationtimestamp' => $dbw->timestamp($this->mEmailAuthenticationtimestamp), 'user_real_name' => $this->mRealName, 'user_options' => $this->encodeOptions(), 'user_token' => $this->mToken