Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -1984,7 +1984,7 @@ |
1985 | 1985 | $edit->revid = $revid; |
1986 | 1986 | $edit->newText = $text; |
1987 | 1987 | $edit->pst = $this->preSaveTransform( $text, $user, $popts ); |
1988 | | - $edit->popts = $this->getParserOptions( true ); |
| 1988 | + $edit->popts = $this->makeParserOptions( new User ); |
1989 | 1989 | $edit->output = $wgParser->parse( $edit->pst, $this->mTitle, $edit->popts, true, true, $revid ); |
1990 | 1990 | $edit->oldText = $this->getRawText(); |
1991 | 1991 | |
— | — | @@ -2563,13 +2563,11 @@ |
2564 | 2564 | * Get parser options suitable for rendering the primary article wikitext |
2565 | 2565 | * @param $canonical boolean Determines that the generated options must not depend on user preferences (see bug 14404) |
2566 | 2566 | * @return mixed ParserOptions object or boolean false |
2567 | | - * @deprecated since 1.19 |
2568 | 2567 | */ |
2569 | | - public function getParserOptions( $canonical = false ) { |
2570 | | - global $wgUser, $wgLanguageCode; |
2571 | | - if ( !$this->mParserOptions || $canonical ) { |
2572 | | - $user = !$canonical ? $wgUser : new User; |
2573 | | - $this->mParserOptions = $this->makeParserOptions( $user ); |
| 2568 | + public function getParserOptions() { |
| 2569 | + global $wgUser; |
| 2570 | + if ( !$this->mParserOptions ) { |
| 2571 | + $this->mParserOptions = $this->makeParserOptions( $wgUser ); |
2574 | 2572 | } |
2575 | 2573 | // Clone to allow modifications of the return value without affecting cache |
2576 | 2574 | return clone $this->mParserOptions; |