Index: trunk/extensions/MetavidWiki/includes/articlepages/MV_SequencePage.php |
— | — | @@ -32,12 +32,13 @@ |
33 | 33 | function getSequenceSMIL(){ |
34 | 34 | global $wgParser,$wgOut, $wgUser, $wgEnableParserCache; |
35 | 35 | //temporally stop cache: |
36 | | - $wgEnableParserCache = $parserOutput =false; |
| 36 | + $wgEnableParserCache = false; |
37 | 37 | |
| 38 | + $parserOptions = ParserOptions::newFromUser( $wgUser ); |
| 39 | + $parserOptions->addExtraKey( 'mv:seq-xml' ); //differentiate the articles xml from article |
| 40 | + |
38 | 41 | if( $wgEnableParserCache ) { |
39 | | - $parserOptions = ParserOptions::newFromUser( $wgUser ); |
40 | 42 | $mvParserCache = ParserCache::singleton(); |
41 | | - $parserOptions->addExtraKey( 'mv:seq-xml' ); //differentiate the articles xml from article |
42 | 43 | $parserOutput = $mvParserCache->get( $this, $parserOptions ); |
43 | 44 | |
44 | 45 | if( $parserOutput != false ) |
— | — | @@ -52,13 +53,13 @@ |
53 | 54 | |
54 | 55 | //@@todo get parser Output Object (maybe cleaner way to do this? |
55 | 56 | //maybe parser cache is not the right place to cache the sequence xml? ) |
56 | | - $parserOutput = $wgParser->parse('', $this->mTitle, ParserOptions::newFromUser( $wgUser )); |
| 57 | + $parserOutput = $wgParser->parse('', $this->mTitle, $parserOptions ); |
57 | 58 | //output header: |
58 | 59 | $parserOutput->mText.=$this->smilDoc->saveXML(); |
59 | 60 | |
60 | 61 | //save to cache if parser cache enabled: |
61 | 62 | if($wgEnableParserCache) |
62 | | - $mvParserCache->save( $parserOutput, $this, $wgUser ); |
| 63 | + $mvParserCache->save( $parserOutput, $this, $parserOptions ); |
63 | 64 | |
64 | 65 | return $parserOutput->getText(); |
65 | 66 | } |