r105698 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105697‎ | r105698 | r105699 >
Date:19:24, 9 December 2011
Author:foxtrott
Status:ok
Tags:
Comment:
fix bug 32883 ([SF] Magic words like {{PAGENAME}} in form definition do not get displayed)
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormUtils.php
@@ -886,11 +886,10 @@
887887 // us with what we need
888888 $form_def = "__NOEDITSECTION__" . strtr( $form_def, array( '{{{' => '<nowiki>{{{', '}}}' => '}}}</nowiki>' ) );
889889
890 - $title = new Title();
891 - $tmpParser = unserialize( serialize( $parser ) ); // deep clone of parser
 890+ $title = is_object( $parser->getTitle() )?$parser->getTitle():new Title();
892891
893892 // parse wiki-text
894 - $output = $tmpParser->parse( $form_def, $title, $tmpParser->getOptions() );
 893+ $output = $parser->parse( $form_def, $title, $parser->getOptions() );
895894 $form_def = $output->getText();
896895
897896 // store in cache if allowed

Status & tagging log