Index: trunk/phase3/includes/api/ApiFeedWatchlist.php |
— | — | @@ -62,6 +62,7 @@ |
63 | 63 | // limit to the number of hours going from now back |
64 | 64 | $endTime = wfTimestamp(TS_MW, time() - intval($params['hours'] * 60 * 60)); |
65 | 65 | |
| 66 | + $dbr = wfGetDB( DB_SLAVE ); |
66 | 67 | // Prepare parameters for nested request |
67 | 68 | $fauxReqArr = array ( |
68 | 69 | 'action' => 'query', |
— | — | @@ -70,7 +71,7 @@ |
71 | 72 | 'list' => 'watchlist', |
72 | 73 | 'wlprop' => 'title|user|comment|timestamp', |
73 | 74 | 'wldir' => 'older', // reverse order - from newest to oldest |
74 | | - 'wlend' => $endTime, // stop at this time |
| 75 | + 'wlend' => $dbr->timestamp($endTime), // stop at this time |
75 | 76 | 'wllimit' => 50 |
76 | 77 | ); |
77 | 78 | |