Merge "Make the filter field on ViewHistory of "int" type"

This commit is contained in:
jenkins-bot 2019-03-17 12:00:47 +00:00 committed by Gerrit Code Review
commit ef8c8e6006
4 changed files with 6 additions and 6 deletions

View file

@ -352,7 +352,7 @@ class AbuseFilter {
}
/**
* @param string $filter
* @param string|int $filter
* @return bool
*/
public static function filterHidden( $filter ) {
@ -809,7 +809,7 @@ class AbuseFilter {
/**
* Utility function to decode "<GLOBAL_FILTER_PREFIX>$index" to $index. Returns false if not global
*
* @param string $filter
* @param string|int $filter
*
* @return string|bool
*/

View file

@ -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',

View file

@ -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

View file

@ -853,7 +853,7 @@ class SpecialAbuseLog extends SpecialPage {
}
/**
* @param string|null $filter_id
* @param string|int|null $filter_id
* @param bool|int|null $filter_hidden
* @return bool
*/