Make timestamp in consistent format after loaded from database

timestamp is generated in MW format (YYYYMMDDHHMMSS)
for notification but it's
loaded into model in the database specific format.  We just need
to convert it back to MW format, it just happens that MW
format is the same as MySQL timestamp format

Change-Id: I1f7f2aeb32b63d47e92631d6daa711d9c32e4017
This commit is contained in:
bsitu 2014-08-18 15:49:26 -07:00 committed by Jdlrobson
parent 4ec639ec50
commit 31a986bebd

View file

@ -185,8 +185,8 @@ class EchoNotification extends EchoAbstractEntity {
$notification->targetPage = EchoTargetPage::newFromRow( $row );
}
$notification->user = User::newFromId( $row->notification_user );
$notification->timestamp = $row->notification_timestamp;
$notification->readTimestamp = $row->notification_read_timestamp;
$notification->timestamp = wfTimestamp( TS_MW, $row->notification_timestamp );
$notification->readTimestamp = wfTimestamp( TS_MW, $row->notification_read_timestamp );
$notification->bundleBase = $row->notification_bundle_base;
$notification->bundleHash = $row->notification_bundle_hash;
$notification->bundleDisplayHash = $row->notification_bundle_display_hash;