diff --git a/includes/AbuseFilter.php b/includes/AbuseFilter.php index 38492476e..ab580fad5 100644 --- a/includes/AbuseFilter.php +++ b/includes/AbuseFilter.php @@ -351,7 +351,7 @@ class AbuseFilter { } /** - * @param string $filter + * @param string|int $filter * @return bool */ public static function filterHidden( $filter ) { @@ -808,7 +808,7 @@ class AbuseFilter { /** * Utility function to decode global-$index to $index. Returns false if not global * - * @param string $filter + * @param string|int $filter * * @return string|bool */ diff --git a/includes/Views/AbuseFilterViewHistory.php b/includes/Views/AbuseFilterViewHistory.php index d1faf2d6c..be1ca349f 100644 --- a/includes/Views/AbuseFilterViewHistory.php +++ b/includes/Views/AbuseFilterViewHistory.php @@ -18,7 +18,7 @@ class AbuseFilterViewHistory extends AbuseFilterView { $out->enableOOUI(); $filter = $this->getRequest()->getText( 'filter' ) ?: $this->mFilter; // Ensure the parameter is a valid filter ID - $filter = preg_match( '/^[1-9][0-9]*$/', (string)$filter ) === 0 ? null : (int)$filter; + $filter = (int)$filter; if ( $filter ) { $out->setPageTitle( $this->msg( 'abusefilter-history' )->numParams( $filter ) ); @@ -77,7 +77,7 @@ class AbuseFilterViewHistory extends AbuseFilterView { 'label-message' => 'abusefilter-history-select-user' ], 'filter' => [ - 'type' => 'text', + 'type' => 'int', 'name' => 'filter', 'default' => $filter, 'size' => '45', diff --git a/includes/pagers/AbuseFilterHistoryPager.php b/includes/pagers/AbuseFilterHistoryPager.php index 9613568cd..5a726611b 100644 --- a/includes/pagers/AbuseFilterHistoryPager.php +++ b/includes/pagers/AbuseFilterHistoryPager.php @@ -7,7 +7,7 @@ class AbuseFilterHistoryPager extends TablePager { protected $linkRenderer; /** - * @param string $filter + * @param int $filter * @param AbuseFilterViewHistory $page * @param string $user User name * @param LinkRenderer $linkRenderer diff --git a/includes/special/SpecialAbuseLog.php b/includes/special/SpecialAbuseLog.php index 47fce3ccf..e56e5b2f2 100644 --- a/includes/special/SpecialAbuseLog.php +++ b/includes/special/SpecialAbuseLog.php @@ -857,7 +857,7 @@ class SpecialAbuseLog extends SpecialPage { } /** - * @param string|null $filter_id + * @param string|int|null $filter_id * @param bool|int|null $filter_hidden * @return bool */