http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72905

Revision: 72905
Author:   catrope
Date:     2010-09-13 15:14:11 +0000 (Mon, 13 Sep 2010)

Log Message:
-----------
(bug 25137) Don't open a DB connection just to (wrongly) use $dbr->timestamp()

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiFeedWatchlist.php

Modified: trunk/phase3/includes/api/ApiFeedWatchlist.php
===================================================================
--- trunk/phase3/includes/api/ApiFeedWatchlist.php      2010-09-13 15:08:37 UTC 
(rev 72904)
+++ trunk/phase3/includes/api/ApiFeedWatchlist.php      2010-09-13 15:14:11 UTC 
(rev 72905)
@@ -62,7 +62,6 @@
                        // 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 @@
                                '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
                        );
 



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to