r84063 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84062‎ | r84063 | r84064 >
Date:22:39, 15 March 2011
Author:foxtrott
Status:deferred
Tags:
Comment:
enable parsing of default values
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php
@@ -348,7 +348,7 @@
349349 // remove the '<nowiki>' tags, leaving us with what we need.
350350 $form_def = "__NOEDITSECTION__" . strtr( $form_def, array( '{{{' => '<nowiki>{{{', '}}}' => '}}}</nowiki>' ) );
351351 if ( empty( $wgParser->mOptions ) ) {
352 - $wgParser->mOptions = new ParserOptions();
 352+ $wgParser -> startExternalParse( $title, ParserOptions::newFromUser($wgUser), Parser::OT_HTML, true );
353353 }
354354
355355 // Get the form definition from the cache, if we're using caching and it's
@@ -679,7 +679,7 @@
680680 if ( $sub_components[0] == 'input type' ) {
681681 $input_type = $sub_components[1];
682682 } elseif ( $sub_components[0] == 'default' ) {
683 - $default_value = $sub_components[1];
 683+ $default_value = $wgParser -> recursiveTagParse( $sub_components[1] );
684684 } elseif ( $sub_components[0] == 'preload' ) {
685685 // free text field has special handling
686686 if ( $field_name == 'free text' || $field_name == '<freetext>' ) {