Page MenuHomeWickedGov Phorge

HTMLUserTextFieldAllowingGlobalBlockIds.php
No OneTemporary

Size
618 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 {
public function validate( $value, $alldata ) {
if ( GlobalBlockLookup::isAGlobalBlockId( $value ) ) {
return true;
}
return parent::validate( $value, $alldata );
}
}

File Metadata

Mime Type
text/x-php
Expires
Wed, Aug 19, 16:20 (4 w, 1 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5b/b8/1ae7903dd0fbd0cb2d6a15a507ec
Default Alt Text
HTMLUserTextFieldAllowingGlobalBlockIds.php (618 B)

Event Timeline