r90459 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90458‎ | r90459 | r90460 >
Date:12:10, 20 June 2011
Author:yaron
Status:deferred
Tags:
Comment:
Fix for r90422 - actually got parsing of "default filename" to work now
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -681,6 +681,10 @@
682682 // add handling for single-value params, for custom input types
683683 $field_args[$sub_components[0]] = null;
684684 } elseif ( count( $sub_components ) == 2 ) {
 685+ // First, set each value as its own entry in $field_args.
 686+ $field_args[$sub_components[0]] = $sub_components[1];
 687+
 688+ // Then, do all special handling.
685689 if ( $sub_components[0] == 'input type' ) {
686690 $input_type = $sub_components[1];
687691 } elseif ( $sub_components[0] == 'default' ) {
@@ -758,12 +762,9 @@
759763 } elseif ( $sub_components[0] == 'default filename' ) {
760764 $default_filename = str_replace( '<page name>', $page_name, $sub_components[1] );
761765 // Parse value, so default filename can include parser functions.
762 - $default_value = $wgParser->recursiveTagParse( $default_filename );
 766+ $default_filename = $wgParser->recursiveTagParse( $default_filename );
763767 $field_args['default filename'] = $default_filename;
764768 }
765 -
766 - // Also set each value as its own entry in $field_args
767 - $field_args[$sub_components[0]] = $sub_components[1];
768769 }
769770 }
770771 } // end for

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90422Added parsing of 'default filename' parameter (now two params get parsed - 'd...yaron00:09, 20 June 2011