r53052 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53051‎ | r53052 | r53053 >
Date:13:55, 10 July 2009
Author:midom
Status:resolved (Comments)
Tags:
Comment:
don't allow querying specific namespace if misermode is enabled
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryCategoryMembers.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php
@@ -83,7 +83,12 @@
8484 $this->addWhere('cl_from=page_id');
8585 $this->setContinuation($params['continue'], $params['dir']);
8686 $this->addWhereFld('cl_to', $categoryTitle->getDBkey());
87 - $this->addWhereFld('page_namespace', $params['namespace']);
 87+ # Scanning large datasets for rare categories sucks, and I already told
 88+ # how to have efficient subcategory access :-) ~~~~ (oh well, domas)
 89+ global $wgMiserMode;
 90+ if (!$wgMiserMode) {
 91+ $this->addWhereFld('page_namespace', $params['namespace']);
 92+ }
8893 if($params['sort'] == 'timestamp')
8994 $this->addWhereRange('cl_timestamp', ($params['dir'] == 'asc' ? 'newer' : 'older'), $params['start'], $params['end']);
9095 else

Follow-up revisions

RevisionCommit summaryAuthorDate
r53087Followup to r53052 - Die if someone tries to use the namespace filter, rather...mrzman23:46, 10 July 2009
r53168Followup to r53087 / r53052 - Change dieUsage to setWarning per CodeReviewmrzman14:54, 13 July 2009

Comments

#Comment by Anomie (talk | contribs)   22:01, 10 July 2009

Good that you "already told". Bad that you didn't bother to tell any of us who aren't whoever you already told; especially since this breaks many bots, we could better clamor for the fix if we knew what it was.

#Comment by Umherirrender (talk | contribs)   11:52, 11 July 2009

Please tag version with "live", when synchronized them. Thanks.

Please also synchronized r53087, so bots/user get a message. That makes it easy to find, why bots are not working. Thanks.

Status & tagging log