Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -349,10 +349,9 @@ |
350 | 350 | // element, so that the wiki parser won't touch it - the parser will |
351 | 351 | // remove the '<nowiki>' tags, leaving us with what we need. |
352 | 352 | $form_def = "__NOEDITSECTION__" . strtr( $form_def, array( '{{{' => '<nowiki>{{{', '}}}' => '}}}</nowiki>' ) ); |
353 | | - $old_strip_state = $wgParser->mStripState; |
354 | | - $wgParser->mStripState = new StripState(); |
355 | | - $wgParser->mOptions = new ParserOptions(); |
356 | | - $wgParser->mOptions->initialiseFromUser( $wgUser ); |
| 353 | + if ( empty( $wgParser->mOptions ) ) { |
| 354 | + $wgParser->mOptions = new ParserOptions(); |
| 355 | + } |
357 | 356 | |
358 | 357 | // Get the form definition from the cache, if we're using caching and it's |
359 | 358 | // there. |
— | — | @@ -370,7 +369,6 @@ |
371 | 370 | if ( ! $got_form_def_from_cache ) { |
372 | 371 | $form_def = $wgParser->parse( $form_def, $this->mPageTitle, $wgParser->mOptions )->getText(); |
373 | 372 | } |
374 | | - $wgParser->mStripState = $old_strip_state; |
375 | 373 | |
376 | 374 | // turn form definition file into an array of sections, one for each |
377 | 375 | // template definition (plus the first section) |