Followup r91168, fix last usage of $currentUser which was undefined

This commit is contained in:
Sam Reed 2011-07-01 01:30:26 +00:00
parent 2c292086eb
commit 7d6d29cb7a

View file

@ -2582,13 +2582,14 @@ class User {
$this->setNewtalk( false ); $this->setNewtalk( false );
return; return;
} }
if( $currentUser != 0 ) { $id = $this->getId();
if( $id != 0 ) {
$dbw = wfGetDB( DB_MASTER ); $dbw = wfGetDB( DB_MASTER );
$dbw->update( 'watchlist', $dbw->update( 'watchlist',
array( /* SET */ array( /* SET */
'wl_notificationtimestamp' => null 'wl_notificationtimestamp' => null
), array( /* WHERE */ ), array( /* WHERE */
'wl_user' => $this->getId() 'wl_user' => $id
), __METHOD__ ), __METHOD__
); );
# We also need to clear here the "you have new message" notification for the own user_talk page # We also need to clear here the "you have new message" notification for the own user_talk page