The number provided by the query can be arbitrary, so let's narrow the
input validation to booleans.
Bug: T194616
Change-Id: If03e6e2d5bbcf4f2d85047cc23ee5388b39fe114
$query = $this->getDefaultQuery();
$queryKey = "hide_{$type}_log";
- $hideVal = 1 - intval( $val );
+ $hideVal = $val ? 0 : 1;
$query[$queryKey] = $hideVal;
$link = $linkRenderer->makeKnownLink(
return $filters;
}
foreach ( $wgFilterLogTypes as $type => $default ) {
- $hide = $this->getRequest()->getInt( "hide_{$type}_log", $default );
+ $hide = $this->getRequest()->getBool( "hide_{$type}_log", $default );
$filters[$type] = $hide;
if ( $hide ) {