Yaron Koren has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/393518 )
Change subject: Changed forminput autocompletion to always be remote ...................................................................... Changed forminput autocompletion to always be remote Local autocompletion sometimes didn't work, apparently due to caching. Change-Id: Ic44fac5ded23ebf4cc5511260d7c9ffe019fc6e0 --- M includes/PF_ParserFunctions.php 1 file changed, 7 insertions(+), 10 deletions(-) Approvals: Yaron Koren: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/PF_ParserFunctions.php b/includes/PF_ParserFunctions.php index 02017cf..be102d1 100644 --- a/includes/PF_ParserFunctions.php +++ b/includes/PF_ParserFunctions.php @@ -303,16 +303,13 @@ $inputID = 'input_' . $input_num; $formInputAttrs['id'] = $inputID; $formInputAttrs['class'] = 'autocompleteInput createboxInput formInput'; - global $wgPageFormsMaxLocalAutocompleteValues; - $autocompletion_values = PFValuesUtils::getAutocompleteValues( $inAutocompletionSource, $autocompletionType ); - if ( count( $autocompletion_values ) > $wgPageFormsMaxLocalAutocompleteValues ) { - $formInputAttrs['autocompletesettings'] = $inAutocompletionSource; - $formInputAttrs['autocompletedatatype'] = $autocompletionType; - } else { - global $wgPageFormsAutocompleteValues; - $wgPageFormsAutocompleteValues[$inputID] = $autocompletion_values; - $formInputAttrs['autocompletesettings'] = $inputID; - } + // This code formerly only used remote autocompletion + // when the number of autocompletion values was above + // a certain limit - as happens in regular forms - + // but local autocompletion didn't always work, + // apparently due to page caching. + $formInputAttrs['autocompletesettings'] = $inAutocompletionSource; + $formInputAttrs['autocompletedatatype'] = $autocompletionType; } // The value has already been HTML-encoded as a parameter, -- To view, visit https://gerrit.wikimedia.org/r/393518 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic44fac5ded23ebf4cc5511260d7c9ffe019fc6e0 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/PageForms Gerrit-Branch: master Gerrit-Owner: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: Yaron Koren <yaro...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits