Index: trunk/phase3/includes/Article.php |
— | — | @@ -382,7 +382,7 @@ |
383 | 383 | |
384 | 384 | $parserCache = ParserCache::singleton(); |
385 | 385 | |
386 | | - $parserOptions = $this->mPage->getParserOptions(); |
| 386 | + $parserOptions = $this->getParserOptions(); |
387 | 387 | # Render printable version, use printable version cache |
388 | 388 | if ( $wgOut->isPrintable() ) { |
389 | 389 | $parserOptions->setIsPrintable( true ); |
— | — | @@ -1004,7 +1004,7 @@ |
1005 | 1005 | global $wgOut; |
1006 | 1006 | |
1007 | 1007 | $oldid = $this->getOldID(); |
1008 | | - $parserOptions = $this->mPage->getParserOptions(); |
| 1008 | + $parserOptions = $this->getParserOptions(); |
1009 | 1009 | |
1010 | 1010 | # Render printable version, use printable version cache |
1011 | 1011 | $parserOptions->setIsPrintable( $wgOut->isPrintable() ); |
— | — | @@ -1031,7 +1031,7 @@ |
1032 | 1032 | public function tryDirtyCache() { |
1033 | 1033 | global $wgOut; |
1034 | 1034 | $parserCache = ParserCache::singleton(); |
1035 | | - $options = $this->mPage->getParserOptions(); |
| 1035 | + $options = $this->getParserOptions(); |
1036 | 1036 | |
1037 | 1037 | if ( $wgOut->isPrintable() ) { |
1038 | 1038 | $options->setIsPrintable( true ); |
— | — | @@ -1839,7 +1839,7 @@ |
1840 | 1840 | global $wgParser, $wgEnableParserCache, $wgUseFileCache; |
1841 | 1841 | |
1842 | 1842 | if ( !$parserOptions ) { |
1843 | | - $parserOptions = $this->mPage->getParserOptions(); |
| 1843 | + $parserOptions = $this->getParserOptions(); |
1844 | 1844 | } |
1845 | 1845 | |
1846 | 1846 | $time = - wfTime(); |
— | — | @@ -1873,6 +1873,19 @@ |
1874 | 1874 | } |
1875 | 1875 | |
1876 | 1876 | /** |
| 1877 | + * Get parser options suitable for rendering the primary article wikitext |
| 1878 | + * @return mixed ParserOptions object or boolean false |
| 1879 | + */ |
| 1880 | + public function getParserOptions() { |
| 1881 | + global $wgUser; |
| 1882 | + if ( !$this->mParserOptions ) { |
| 1883 | + $this->mParserOptions = $this->mPage->makeParserOptions( $wgUser ); |
| 1884 | + } |
| 1885 | + // Clone to allow modifications of the return value without affecting cache |
| 1886 | + return clone $this->mParserOptions; |
| 1887 | + } |
| 1888 | + |
| 1889 | + /** |
1877 | 1890 | * Sets the context this Article is executed in |
1878 | 1891 | * |
1879 | 1892 | * @param $context IContextSource |
Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -2559,19 +2559,6 @@ |
2560 | 2560 | } |
2561 | 2561 | |
2562 | 2562 | /** |
2563 | | - * Get parser options suitable for rendering the primary article wikitext |
2564 | | - * @return mixed ParserOptions object or boolean false |
2565 | | - */ |
2566 | | - public function getParserOptions() { |
2567 | | - global $wgUser; |
2568 | | - if ( !$this->mParserOptions ) { |
2569 | | - $this->mParserOptions = $this->makeParserOptions( $wgUser ); |
2570 | | - } |
2571 | | - // Clone to allow modifications of the return value without affecting cache |
2572 | | - return clone $this->mParserOptions; |
2573 | | - } |
2574 | | - |
2575 | | - /** |
2576 | 2563 | * Get parser options suitable for rendering the primary article wikitext |
2577 | 2564 | * @param User|string $user User object or 'canonical' |
2578 | 2565 | * @return ParserOptions |