LogPager: separate getter from query filter
authorMatěj Suchánek <matejsuchanek97@gmail.com>
Fri, 13 Sep 2019 17:40:13 +0000 (19:40 +0200)
committerMatěj Suchánek <matejsuchanek97@gmail.com>
Thu, 19 Sep 2019 18:32:09 +0000 (18:32 +0000)
commit15cc583cb6efca8bd1ac428fc8ba0ec3dc28cb7e
treecf63f8d6f514ddc949b1f545ed3d7fa45c72c73e
parent5d3194bbcd6b88c279396f28ee0ebc5c71594762
LogPager: separate getter from query filter

The method LogPager::getFilterParams combines data aggregation and query
modification which is problematic: it starts with "get" and is public
but has a side-effect. Instead, make a dedicated private method for
building the query and remove the side-effect.

The new private method is now dedicated to building the query, and so
it can also make sure whether selection by log id is requested. If it's
the case, it won't filter the log types out (fix for T220834).

Also remove redundant comment: it's irrelevant to require callers to
call a private method.

Bug: T220834
Change-Id: I0fb6e6ee30ac626192cdf4ef920a731c03b2732f
includes/logging/LogPager.php