diff --git a/includes/UnreadWikis.php b/includes/UnreadWikis.php index 16b3e6146..dbe6ec395 100644 --- a/includes/UnreadWikis.php +++ b/includes/UnreadWikis.php @@ -117,17 +117,13 @@ class EchoUnreadWikis { if ( $alertCount || $msgCount ) { $values = [ 'euw_alerts' => $alertCount, - 'euw_alerts_ts' => $dbw->timestamp( - $alertTime - ? $alertTime->getTimestamp( TS_MW ) - : static::DEFAULT_TS - ), + 'euw_alerts_ts' => $alertTime + ? $alertTime->getTimestamp( TS_MW ) + : static::DEFAULT_TS, 'euw_messages' => $msgCount, - 'euw_messages_ts' => $dbw->timestamp( - $msgTime - ? $msgTime->getTimestamp( TS_MW ) - : static::DEFAULT_TS - ), + 'euw_messages_ts' => $msgTime + ? $msgTime->getTimestamp( TS_MW ) + : static::DEFAULT_TS, ]; // when there is unread alert(s) and/or message(s), upsert the row diff --git a/includes/mapper/NotificationMapper.php b/includes/mapper/NotificationMapper.php index 37b4c6202..8496fda4f 100644 --- a/includes/mapper/NotificationMapper.php +++ b/includes/mapper/NotificationMapper.php @@ -25,8 +25,6 @@ class EchoNotificationMapper extends EchoAbstractMapper { static function ( IDatabase $dbw, $fname ) use ( $row, $listeners ) { $row['notification_timestamp'] = $dbw->timestamp( $row['notification_timestamp'] ); - $row['notification_read_timestamp'] = - $dbw->timestampOrNull( $row['notification_read_timestamp'] ); $dbw->insert( 'echo_notification', $row, $fname ); foreach ( $listeners as $listener ) { $dbw->onTransactionCommitOrIdle( $listener, $fname );