Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7854
patch.txt
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 11:35 PM
2014-11-21 23:35:04 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
patch.txt
View Options
Index: includes/api/ApiQueryWatchlist.php
===================================================================
--- includes/api/ApiQueryWatchlist.php (revision 84756)
+++ includes/api/ApiQueryWatchlist.php (working copy)
@@ -128,8 +128,12 @@
'wl_user' => $userId,
'rc_deleted' => 0,
) );
+
+ $db = $this->getDB();
- $this->addWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] );
+ $this->addWhereRange( 'rc_timestamp', $params['dir'],
+ $db->timestamp( $params['start'] ),
+ $db->timestamp( $params['end'] ) );
$this->addWhereFld( 'wl_namespace', $params['namespace'] );
$this->addWhereIf( 'rc_this_oldid=page_latest', !$params['allrev'] );
@@ -175,7 +179,7 @@
$this->addWhere( 'rc_user_text != ' . $this->getDB()->addQuotes( $params['excludeuser'] ) );
}
- $db = $this->getDB();
+
// This is an index optimization for mysql, as done in the Special:Watchlist page
$this->addWhereIf( "rc_timestamp > ''", !isset( $params['start'] ) && !isset( $params['end'] ) && $db->getType() == 'mysql' );
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7382
Default Alt Text
patch.txt (1 KB)
Attached To
Mode
T30070: RSS feed for watchlist throws fatal error when underlying db is postgres
Attached
Detach File
Event Timeline
Log In to Comment