Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -49,7 +49,8 @@ |
50 | 50 | } |
51 | 51 | |
52 | 52 | 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; |
54 | 55 | |
55 | 56 | private function run( $resultPageSet = null ) { |
56 | 57 | global $wgUser; |
— | — | @@ -85,6 +86,7 @@ |
86 | 87 | $this->fld_timestamp = isset( $prop['timestamp'] ); |
87 | 88 | $this->fld_sizes = isset( $prop['sizes'] ); |
88 | 89 | $this->fld_patrol = isset( $prop['patrol'] ); |
| 90 | + $this->fld_notificationtimestamp = isset( $prop['notificationtimestamp'] ); |
89 | 91 | |
90 | 92 | if ( $this->fld_patrol ) { |
91 | 93 | if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) |
— | — | @@ -113,6 +115,7 @@ |
114 | 116 | $this->addFieldsIf( 'rc_patrolled', $this->fld_patrol ); |
115 | 117 | $this->addFieldsIf( 'rc_old_len', $this->fld_sizes ); |
116 | 118 | $this->addFieldsIf( 'rc_new_len', $this->fld_sizes ); |
| 119 | + $this->addFieldsIf( 'wl_notificationtimestamp', $this->fld_notificationtimestamp ); |
117 | 120 | } elseif ( $params['allrev'] ) { |
118 | 121 | $this->addFields( 'rc_this_oldid' ); |
119 | 122 | } else { |
— | — | @@ -257,6 +260,9 @@ |
258 | 261 | $vals['oldlen'] = intval( $row->rc_old_len ); |
259 | 262 | $vals['newlen'] = intval( $row->rc_new_len ); |
260 | 263 | } |
| 264 | + |
| 265 | + if ( $this->fld_notificationtimestamp ) |
| 266 | + $vals['notificationtimestamp'] = ( $row->wl_notificationtimestamp == null ) ? '' : wfTimestamp( TS_ISO_8601, $row->wl_notificationtimestamp); |
261 | 267 | |
262 | 268 | if ( $this->fld_comment && isset( $row->rc_comment ) ) |
263 | 269 | $vals['comment'] = $row->rc_comment; |
— | — | @@ -309,6 +315,7 @@ |
310 | 316 | 'timestamp', |
311 | 317 | 'patrol', |
312 | 318 | 'sizes', |
| 319 | + 'notificationtimestamp' |
313 | 320 | ) |
314 | 321 | ), |
315 | 322 | 'show' => array ( |