r84552 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84551‎ | r84552 | r84553 >
Date:20:34, 22 March 2011
Author:yaron
Status:deferred
Tags:
Comment:
Fixed handling of "values from url" parameter
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormInputs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormInputs.php
@@ -777,7 +777,7 @@
778778 return array( '_str' );
779779 }
780780
781 - public static function getAutocompletionTypeAndSource( $field_args ) {
 781+ public static function getAutocompletionTypeAndSource( &$field_args ) {
782782 if ( array_key_exists( 'values from property', $field_args ) ) {
783783 $autocompletionSource = $field_args['values from property'];
784784 $propValue = SMWPropertyValue::makeUserProperty( $autocompletionSource );
@@ -797,9 +797,9 @@
798798 $autocompletionSource = $field_args['values from namespace'];
799799 } elseif ( array_key_exists( 'values from url', $field_args ) ) {
800800 $autocompleteFieldType = 'external_url';
801 - $autocompletionSource = $field_args['values from namespace'];
 801+ $autocompletionSource = $field_args['values from url'];
802802 // Autocompletion from URL is always done remotely.
803 - $field_args['remote autocompletion'] == true;
 803+ $field_args['remote autocompletion'] = true;
804804 } elseif ( array_key_exists( 'values', $field_args ) ) {
805805 global $sfgFieldNum;
806806 $autocompleteFieldType = 'values';