r61730 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61729‎ | r61730 | r61731 >
Date:22:48, 30 January 2010
Author:reedy
Status:ok
Tags:
Comment:
Start of implementation of bug 18758 - Get value of wl_notificationtimestamp
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryWatchlist.php
@@ -49,7 +49,8 @@
5050 }
5151
5252 private $fld_ids = false, $fld_title = false, $fld_patrol = false, $fld_flags = false,
53 - $fld_timestamp = false, $fld_user = false, $fld_comment = false, $fld_sizes = false;
 53+ $fld_timestamp = false, $fld_user = false, $fld_comment = false, $fld_sizes = false,
 54+ $fld_notificationtimestamp = false;
5455
5556 private function run( $resultPageSet = null ) {
5657 global $wgUser;
@@ -85,6 +86,7 @@
8687 $this->fld_timestamp = isset( $prop['timestamp'] );
8788 $this->fld_sizes = isset( $prop['sizes'] );
8889 $this->fld_patrol = isset( $prop['patrol'] );
 90+ $this->fld_notificationtimestamp = isset( $prop['notificationtimestamp'] );
8991
9092 if ( $this->fld_patrol ) {
9193 if ( !$user->useRCPatrol() && !$user->useNPPatrol() )
@@ -113,6 +115,7 @@
114116 $this->addFieldsIf( 'rc_patrolled', $this->fld_patrol );
115117 $this->addFieldsIf( 'rc_old_len', $this->fld_sizes );
116118 $this->addFieldsIf( 'rc_new_len', $this->fld_sizes );
 119+ $this->addFieldsIf( 'wl_notificationtimestamp', $this->fld_notificationtimestamp );
117120 } elseif ( $params['allrev'] ) {
118121 $this->addFields( 'rc_this_oldid' );
119122 } else {
@@ -257,6 +260,9 @@
258261 $vals['oldlen'] = intval( $row->rc_old_len );
259262 $vals['newlen'] = intval( $row->rc_new_len );
260263 }
 264+
 265+ if ( $this->fld_notificationtimestamp )
 266+ $vals['notificationtimestamp'] = ( $row->wl_notificationtimestamp == null ) ? '' : wfTimestamp( TS_ISO_8601, $row->wl_notificationtimestamp);
261267
262268 if ( $this->fld_comment && isset( $row->rc_comment ) )
263269 $vals['comment'] = $row->rc_comment;
@@ -309,6 +315,7 @@
310316 'timestamp',
311317 'patrol',
312318 'sizes',
 319+ 'notificationtimestamp'
313320 )
314321 ),
315322 'show' => array (

Follow-up revisions

RevisionCommit summaryAuthorDate
r61731RELEASE-NOTES for r61730 after https://bugzilla.wikimedia.org/show_bug.cgi?id......reedy22:57, 30 January 2010

Status & tagging log