r22676 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22675‎ | r22676 | r22677 >
Date:14:18, 3 June 2007
Author:yurik
Status:old
Tags:
Comment:
API: fixed bug 10109 PostgreSQL API bug in ApiQueryWatchlist::run
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryWatchlist.php
@@ -48,10 +48,11 @@
4949 $this->run($resultPageSet);
5050 }
5151
52 - private $fld_ids = false, $fld_title = false, $fld_patrol = false, $fld_flags = false, $fld_timestamp = false, $fld_user = false, $fld_comment = false;
 52+ private $fld_ids = false, $fld_title = false, $fld_patrol = false, $fld_flags = false,
 53+ $fld_timestamp = false, $fld_user = false, $fld_comment = false;
5354
5455 private function run($resultPageSet = null) {
55 - global $wgUser;
 56+ global $wgUser, $wgDBtype;
5657
5758 $this->selectNamedDB('watchlist', DB_SLAVE, 'watchlist');
5859
@@ -132,7 +133,9 @@
133134 $this->addWhereRange('rc_timestamp', $dir, $start, $end);
134135 $this->addWhereFld('wl_namespace', $namespace);
135136 $this->addWhereIf('rc_this_oldid=page_latest', !$allrev);
136 - $this->addWhereIf("rc_timestamp > ''", !isset ($start) && !isset ($end));
 137+
 138+ # This is a index optimization for mysql, as done in the Special:Watchlist page
 139+ $this->addWhereIf("rc_timestamp > ''", !isset ($start) && !isset ($end) && $wgDBtype == 'mysql');
137140
138141 $this->addOption('LIMIT', $limit +1);
139142

Follow-up revisions

RevisionCommit summaryAuthorDate
r22717Merged revisions 22667-22715 via svnmerge from...david20:00, 4 June 2007

Status & tagging log