Yaron Koren has uploaded a new change for review.
https://gerrit.wikimedia.org/r/264950
Change subject: Removed use of $wgHtml5 - deprecated in MW 1.22
......................................................................
Removed use of $wgHtml5 - deprecated in MW 1.22
Change-Id: Iff6a5e00130ed2b417b7522ccffd309f90f8050f
---
M includes/SF_ParserFunctions.php
1 file changed, 6 insertions(+), 8 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms
refs/changes/50/264950/1
diff --git a/includes/SF_ParserFunctions.php b/includes/SF_ParserFunctions.php
index f2487d9..5974cbf 100644
--- a/includes/SF_ParserFunctions.php
+++ b/includes/SF_ParserFunctions.php
@@ -232,8 +232,6 @@
}
static function renderFormInput( &$parser ) {
- global $wgHtml5;
-
$params = func_get_args();
array_shift( $params ); // don't need the parser
@@ -244,8 +242,8 @@
$inRemoteAutocompletion = false;
$inSize = 25;
$classStr = "sfFormInput";
- $inPlaceholder = "";
- $inAutofocus = true; // Only evaluated if $wgHtml5 is true.
+ $inPlaceholder = null;
+ $inAutofocus = true;
// Assign params.
foreach ( $params as $i => $param ) {
@@ -306,11 +304,11 @@
$formInputAttrs = array( 'size' => $inSize );
- if ( $wgHtml5 ) {
+ if ( $inPlaceholder != null ) {
$formInputAttrs['placeholder'] = $inPlaceholder;
- if ( $inAutofocus ) {
- $formInputAttrs['autofocus'] = 'autofocus';
- }
+ }
+ if ( $inAutofocus ) {
+ $formInputAttrs['autofocus'] = 'autofocus';
}
// Now apply the necessary settings and Javascript, depending
--
To view, visit https://gerrit.wikimedia.org/r/264950
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff6a5e00130ed2b417b7522ccffd309f90f8050f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits