mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 09:40:41 +00:00
Revert "Call IDatabase::timestamp before inserting rows"
This reverts commit 4eb8fa23e4
.
Reason for revert:
Wikimedia\Timestamp\ConvertibleTimestamp::getTimestamp:
The timestamp cannot be represented in the specified format
Bug: T304307
Change-Id: I1c8c409b7820512b3e31246a7f3d8c1cf4db209c
This commit is contained in:
parent
4eb8fa23e4
commit
9433b83f2d
|
@ -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
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue