r77172 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77171‎ | r77172 | r77173 >
Date:18:40, 23 November 2010
Author:yaron
Status:deferred
Tags:
Comment:
Fixed setting of Javascript variables added in SF 2.0.2, so autocompletion can work again with MW 1.15 and earlier
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -19,9 +19,11 @@
2020 $vars['sfgAdderButtons'] = $sfgAdderButtons;
2121 $vars['sfgRemoverButtons'] = $sfgRemoverButtons;
2222 $vars['autocompleteOnAllChars'] = $sfgAutocompleteOnAllChars;
23 - $vars['sfgAutocompleteMappings'] = $sfgAutocompleteMappings;
24 - $vars['sfgAutocompleteValues'] = $sfgAutocompleteValues;
25 - $vars['sfgAutocompleteDataTypes'] = $sfgAutocompleteDataTypes;
 23+ // variables that are associative arrays need to be cast as
 24+ // objects, to work with MW 1.15 and earlier
 25+ $vars['sfgAutocompleteMappings'] = (object)$sfgAutocompleteMappings;
 26+ $vars['sfgAutocompleteValues'] = (object)$sfgAutocompleteValues;
 27+ $vars['sfgAutocompleteDataTypes'] = (object)$sfgAutocompleteDataTypes;
2628 $vars['sfgComboBoxInputs'] = $sfgComboBoxInputs;
2729 $vars['sfgAutogrowInputs'] = $sfgAutogrowInputs;
2830 $vars['sfgFormErrorsHeader'] = Xml::escapeJsString( wfMsg( 'sf_formerrors_header' ) );

Status & tagging log