Bsitu has uploaded a new change for review. https://gerrit.wikimedia.org/r/65141
Change subject: Removing prefix exception for HTMLCheckMatrix ...................................................................... Removing prefix exception for HTMLCheckMatrix Unifying how the option prefix is handled for HTMLCheckMatrix and HTMLMultiSelectField. This needs to be deployed at the same time as the dependant Echo extension change Ic8420b89. Change-Id: I4049b666db554283ce953387a30a0a8a7d0cd920 --- M includes/Preferences.php 1 file changed, 2 insertions(+), 9 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/41/65141/1 diff --git a/includes/Preferences.php b/includes/Preferences.php index 0ada22b..19f76df 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -153,7 +153,7 @@ foreach ( $columns as $column ) { foreach ( $rows as $row ) { - if ( $user->getOption( "$prefix-$column-$row" ) ) { + if ( $user->getOption( "$prefix$column-$row" ) ) { $val[] = "$column-$row"; } } @@ -1567,14 +1567,7 @@ foreach ( $this->mFlatFields as $fieldname => $field ) { if ( $field instanceof HTMLNestedFilterable ) { $info = $field->mParams; - if ( $field instanceof HTMLCheckMatrix ) { - // Echo's use of html check matrix expects the fieldname to be appended with - - // TODO: adjust echo to pass an explicit prefix containing the - and remove - // this misdirection at that time. - $prefix = isset( $info['prefix'] ) ? $info['prefix'] : "$fieldname-"; - } else { - $prefix = isset( $info['prefix'] ) ? $info['prefix'] : "$fieldname"; - } + $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $fieldname; foreach ( $field->filterDataForSubmit( $data[$fieldname] ) as $key => $value ) { $data["$prefix$key"] = $value; } -- To view, visit https://gerrit.wikimedia.org/r/65141 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4049b666db554283ce953387a30a0a8a7d0cd920 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf4 Gerrit-Owner: Bsitu <bs...@wikimedia.org> Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits