mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-24 06:03:49 +00:00
Merge "Make the filter field on ViewHistory of "int" type"
This commit is contained in:
commit
ef8c8e6006
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue