Page MenuHomeWickedGov Phorge

HTMLUserTextFieldAllowingGlobalBlockIds.php
No OneTemporary

Size
638 B
Referenced Files
None
Subscribers
None

HTMLUserTextFieldAllowingGlobalBlockIds.php

<?php
namespace MediaWiki\Extension\GlobalBlocking\Widget;
use MediaWiki\Extension\GlobalBlocking\Services\GlobalBlockLookup;
use MediaWiki\HTMLForm\Field\HTMLUserTextField;
/**
* A field used in GlobalBlocking special pages that extends {@link HTMLUserTextField} and differs by considering
* global block IDs (in the format "#123") valid.
*
* @since 1.43
*/
class HTMLUserTextFieldAllowingGlobalBlockIds extends HTMLUserTextField {
/** @inheritDoc */
public function validate( $value, $alldata ) {
if ( GlobalBlockLookup::isAGlobalBlockId( $value ) ) {
return true;
}
return parent::validate( $value, $alldata );
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Oct 4, 00:18 (2 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b8/52/1845b635d1e05945113cee2a2ac4
Default Alt Text
HTMLUserTextFieldAllowingGlobalBlockIds.php (638 B)

Event Timeline