From 97fa1e5c5bb1507e316be5dab0c179b8c872d4b1 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Mon, 13 Sep 2010 15:14:11 +0000 Subject: [PATCH] (bug 25137) Don't open a DB connection just to (wrongly) use $dbr->timestamp() --- includes/api/ApiFeedWatchlist.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/api/ApiFeedWatchlist.php b/includes/api/ApiFeedWatchlist.php index c54858895f..3cde8dbf77 100644 --- a/includes/api/ApiFeedWatchlist.php +++ b/includes/api/ApiFeedWatchlist.php @@ -62,7 +62,6 @@ class ApiFeedWatchlist extends ApiBase { // limit to the number of hours going from now back $endTime = wfTimestamp( TS_MW, time() - intval( $params['hours'] * 60 * 60 ) ); - $dbr = wfGetDB( DB_SLAVE ); // Prepare parameters for nested request $fauxReqArr = array( 'action' => 'query', @@ -71,7 +70,7 @@ class ApiFeedWatchlist extends ApiBase { 'list' => 'watchlist', 'wlprop' => 'title|user|comment|timestamp', 'wldir' => 'older', // reverse order - from newest to oldest - 'wlend' => $dbr->timestamp( $endTime ), // stop at this time + 'wlend' => wfTimestamp( TS_MW, $endTime ), // stop at this time 'wllimit' => ( 50 > $wgFeedLimit ) ? $wgFeedLimit : 50 ); -- 2.20.1