Make IndexPager query direction code more readable
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 6 Mar 2019 18:51:43 +0000 (10:51 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 6 Mar 2019 22:29:22 +0000 (14:29 -0800)
commit46db79baed031be50b447cca4a0bca6629f67c4a
tree91b5026e4bfdaa5362c87c281ca30b595bb3eda0
parentdf163e0edf3f46c031d7836a840f36867d3db258
Make IndexPager query direction code more readable

Rename $descending variable in doQuery() to $order, along with the
$descending argument to reallyDoQuery() and buildQueryInfo(). Use
new IndexPager::QUERY_* constants for checking and inverting such
values. Fix the comments so that they do not imply the opposite of
what is true anymore.

For compatibility, the constants are boolean values such that any
subclass defining reallyDoQuery()/buildQueryInfo() can use that
argument the same way as before.

Change-Id: I912d3678c755c25463a2fadbec6888f3a87d4215
includes/pager/IndexPager.php
includes/pager/RangeChronologicalPager.php
includes/specials/pagers/ActiveUsersPager.php
includes/specials/pagers/AllMessagesTablePager.php
includes/specials/pagers/ContribsPager.php
includes/specials/pagers/DeletedContribsPager.php
includes/specials/pagers/ImageListPager.php