Bsitu has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/52258


Change subject: Remove unused pretty timestamp
......................................................................

Remove unused pretty timestamp

It is not used anywhere and we are going with a completely different approach

Change-Id: I9c8cbbcacd6dfdf6a7767f784a4b8b80b9c606ee
---
M api/ApiEchoNotifications.php
1 file changed, 0 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/58/52258/1

diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php
index 7eae87a..969eb27 100644
--- a/api/ApiEchoNotifications.php
+++ b/api/ApiEchoNotifications.php
@@ -57,8 +57,6 @@
        public static function getNotifications( $user, $unread = false, 
$format = false, $limit = 20, $timestamp = 0, $offset = 0 ) {
                global $wgEchoBackend;
 
-               $lang = RequestContext::getMain()->getLanguage();
-
                $output = array();
 
                // TODO: Make 'web' based on a new API param?
@@ -66,15 +64,6 @@
 
                foreach ( $res as $row ) {
                        $event = EchoEvent::newFromRow( $row );
-
-                       // Use $row->notification_timestamp instead of 
$event->getTimestamp() for display
-                       // since we do the ordering based on 
notification_timestamp, otherwise, there will
-                       // be a confusing ordering issue in some rare cases
-                       if ( MWInit::methodExists( 'Language', 
'prettyTimestamp' ) ) {
-                               $ts = $lang->prettyTimestamp( 
$row->notification_timestamp, false, $user );
-                       } else {
-                               $ts = $lang->timeanddate( 
$row->notification_timestamp, true );
-                       }
 
                        $timestamp = new MWTimestamp( 
$row->notification_timestamp );
                        $timestampUnix = $timestamp->getTimestamp( TS_UNIX );
@@ -116,7 +105,6 @@
                                'timestamp' => array(
                                        'unix' => $timestampUnix,
                                        'mw' => $timestampMw,
-                                       'pretty' => $ts,
                                        'date' => $date
                                ),
                        );

-- 
To view, visit https://gerrit.wikimedia.org/r/52258
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c8cbbcacd6dfdf6a7767f784a4b8b80b9c606ee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to