36 $info[
'nodata'] =
true;
40 parent::__construct( $info );
42 if ( isset( $info[
'flags'] ) ) {
43 $this->mFlags = $info[
'flags'];
46 if ( isset( $info[
'formnovalidate'] ) ) {
47 $this->mFormnovalidate = $info[
'formnovalidate'];
50 # Generate the label from a message, if possible
51 if ( isset( $info[
'buttonlabel-message'] ) ) {
52 $this->buttonLabel = $this->
getMessage( $info[
'buttonlabel-message'] )->parse();
53 } elseif ( isset( $info[
'buttonlabel'] ) ) {
54 if ( $info[
'buttonlabel'] ===
' ' || $info[
'buttonlabel'] ===
"\u{00A0}" ) {
56 $this->buttonLabel =
"\u{00A0}";
58 $this->buttonLabel = htmlspecialchars( $info[
'buttonlabel'] );
60 } elseif ( isset( $info[
'buttonlabel-raw'] ) ) {
61 $this->buttonLabel = $info[
'buttonlabel-raw'];
67 $prefix =
'mw-htmlform-';
69 $this->mParent->
getConfig()->get(
'UseMediaWikiUIEverywhere' )
73 $flags .=
' ' . $prefix .
'button';
75 foreach ( $this->mFlags as $flag ) {
76 $flags .=
' ' . $prefix . $flag;
79 'class' =>
'mw-htmlform-submit ' . $this->mClass . $flags,
88 return Html::element(
'input', $attr );
90 return Html::rawElement(
'button', $attr,
91 $this->buttonLabel ?: htmlspecialchars( $this->
getDefault() ) );
101 return new OOUI\ButtonInputWidget( [
102 'name' => $this->mName,
104 'label' => !$this->
isBadIE() && $this->buttonLabel
105 ?
new OOUI\HtmlSnippet( $this->buttonLabel )
111 'useInputTag' => $this->
isBadIE(),
112 ] + OOUI\Element::configFromHtmlAttributes(
139 ? $this->mParent->getRequest()
140 : RequestContext::getMain()->getRequest();
141 return (
bool)preg_match(
'/MSIE [1-7]\./i',
$request->getHeader(
'User-Agent' ) );
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on $request