r91205 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91204‎ | r91205 | r91206 >
Date:19:39, 30 June 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
attempting bugfix (apostrophes in template parameters don't work)
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -785,12 +785,11 @@
786786 $field_args['show on select'] = $show_on_select;
787787 // Get the value from the request, if
788788 // it's there, and if it's not an array.
789 - $escaped_field_name = str_replace( "'", "\'", $field_name );
790789 if ( isset( $template_instance_query_values ) &&
791790 $template_instance_query_values != null &&
792791 is_array( $template_instance_query_values ) &&
793 - array_key_exists( $escaped_field_name, $template_instance_query_values ) ) {
794 - $field_query_val = $template_instance_query_values[$escaped_field_name];
 792+ array_key_exists( $field_name, $template_instance_query_values ) ) {
 793+ $field_query_val = $template_instance_query_values[$field_name];
795794 if ( $form_submitted || ( ! is_null( $field_query_val ) && ! is_array( $field_query_val ) ) ) {
796795 $cur_value = $field_query_val;
797796 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r91235Follow-up to r91205 - code now checks for both esaped and unescaped versions ...yaron23:12, 30 June 2011