https://bugzilla.wikimedia.org/show_bug.cgi?id=26909
Roan Kattouw <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #8 from Roan Kattouw <[email protected]> 2011-11-14 08:26:52 UTC --- (In reply to comment #7) > Created attachment 9435 [details] > add dir param for > prop=links|templates|categories|extlinks|iwlinks|langlinks|images|duplicatefiles > Thanks for the patch. Modified patch committed in r102947. > It also changed the handling of ORDER BY in ApiQueryBase::addWhereRange. This > is needed, because the order by can given as array and that was not handled > there. > Good catch. I cleaned up the ApiQueryBase changes a bit before committing. It looked like it would've generated a notice because the access to $this->options['ORDER BY'] wasn't protected with isset() (there was an isset call nearby, but 1) the array access was done unconditionally anyway and 2) isset was called on a variable that was set unconditionally, which means it was used to check for null, which is evil) and the logic with wrapping a non-array value in an array could be replaced with an (array) cast. I ended up using: $optionOrderBy = isset( $this->options['ORDER BY'] ) ? (array)$this->options['ORDER BY'] : array(); $optionOrderBy[] = $order; > Feel free to modify the patch. > The only other modification I made was to drop the ApiQueryExternalLinks.php changes. They added an ORDER BY on el_to which is a partially-indexed blob field, so that would filesort. The query isn't very nice as it is, but this would make it worse. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
