From: jenkins-bot Date: Fri, 22 Apr 2016 20:05:24 +0000 (+0000) Subject: Merge "Fix EventRelayerKafka IDEA errors" X-Git-Tag: 1.31.0-rc.0~7206 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=c3dc6b4a4dfe0f8af7bebde1151c8aa2bdce2872;hp=6fd345a2e505b059768a70e23e33eef67ea3c40a;p=lhc%2Fweb%2Fwiklou.git Merge "Fix EventRelayerKafka IDEA errors" --- diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php index 2b6a0aa4fb..6f88975912 100644 --- a/includes/htmlform/HTMLForm.php +++ b/includes/htmlform/HTMLForm.php @@ -1146,10 +1146,12 @@ class HTMLForm extends ContextSource { } } - $html = Html::rawElement( 'span', - [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n"; + if ( !$buttons ) { + return ''; + } - return $html; + return Html::rawElement( 'span', + [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n"; } /** diff --git a/includes/htmlform/OOUIHTMLForm.php b/includes/htmlform/OOUIHTMLForm.php index 4f8365e019..278d4532aa 100644 --- a/includes/htmlform/OOUIHTMLForm.php +++ b/includes/htmlform/OOUIHTMLForm.php @@ -121,10 +121,12 @@ class OOUIHTMLForm extends HTMLForm { ] + $attrs ); } - $html = Html::rawElement( 'div', - [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n"; + if ( !$buttons ) { + return ''; + } - return $html; + return Html::rawElement( 'div', + [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n"; } protected function wrapFieldSetSection( $legend, $section, $attributes ) { diff --git a/includes/htmlform/VFormHTMLForm.php b/includes/htmlform/VFormHTMLForm.php index c4466153a5..f3cba487a2 100644 --- a/includes/htmlform/VFormHTMLForm.php +++ b/includes/htmlform/VFormHTMLForm.php @@ -137,9 +137,11 @@ class VFormHTMLForm extends HTMLForm { $buttons .= Html::element( 'input', $attrs ) . "\n"; } - $html = Html::rawElement( 'div', - [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n"; + if ( !$buttons ) { + return ''; + } - return $html; + return Html::rawElement( 'div', + [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n"; } }