r30030 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r30029‎ | r30030 | r30031 >
Date:19:37, 21 January 2008
Author:aaron
Status:old
Tags:
Comment:
Convert to the right timestamp format before doing a query
Modified paths:
  • /trunk/phase3/includes/api/ApiFeedWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFeedWatchlist.php
@@ -62,6 +62,7 @@
6363 // limit to the number of hours going from now back
6464 $endTime = wfTimestamp(TS_MW, time() - intval($params['hours'] * 60 * 60));
6565
 66+ $dbr = wfGetDB( DB_SLAVE );
6667 // Prepare parameters for nested request
6768 $fauxReqArr = array (
6869 'action' => 'query',
@@ -70,7 +71,7 @@
7172 'list' => 'watchlist',
7273 'wlprop' => 'title|user|comment|timestamp',
7374 'wldir' => 'older', // reverse order - from newest to oldest
74 - 'wlend' => $endTime, // stop at this time
 75+ 'wlend' => $dbr->timestamp($endTime), // stop at this time
7576 'wllimit' => 50
7677 );
7778

Status & tagging log