Index: branches/REL1_17/phase3/includes/Article.php |
— | — | @@ -41,7 +41,7 @@ |
42 | 42 | var $mTouched = '19700101000000'; // !< |
43 | 43 | var $mUser = -1; // !< Not loaded |
44 | 44 | var $mUserText = ''; // !< username from Revision if set |
45 | | - var $mParserOptions; // !< ParserOptions object for $wgUser articles |
| 45 | + var $mParserOptions; // !< ParserOptions object |
46 | 46 | var $mParserOutput; // !< ParserCache object if set |
47 | 47 | /**@}}*/ |
48 | 48 | |
— | — | @@ -3596,7 +3596,7 @@ |
3597 | 3597 | $edit->revid = $revid; |
3598 | 3598 | $edit->newText = $text; |
3599 | 3599 | $edit->pst = $this->preSaveTransform( $text ); |
3600 | | - $edit->popts = $this->getParserOptions( true ); |
| 3600 | + $edit->popts = $this->getParserOptions(); |
3601 | 3601 | $edit->output = $wgParser->parse( $edit->pst, $this->mTitle, $edit->popts, true, true, $revid ); |
3602 | 3602 | $edit->oldText = $this->getContent(); |
3603 | 3603 | |
— | — | @@ -4437,23 +4437,15 @@ |
4438 | 4438 | |
4439 | 4439 | /** |
4440 | 4440 | * Get parser options suitable for rendering the primary article wikitext |
4441 | | - * @param $canonical boolean Determines that the generated must not depend on user preferences (see bug 14404) |
4442 | 4441 | * @return mixed ParserOptions object or boolean false |
4443 | 4442 | */ |
4444 | | - public function getParserOptions( $canonical = false ) { |
4445 | | - global $wgUser, $wgLanguageCode; |
| 4443 | + public function getParserOptions() { |
| 4444 | + global $wgUser; |
4446 | 4445 | |
4447 | | - if ( !$this->mParserOptions || $canonical ) { |
4448 | | - $user = !$canonical ? $wgUser : new User; |
4449 | | - $parserOptions = new ParserOptions( $user ); |
4450 | | - $parserOptions->setTidy( true ); |
4451 | | - $parserOptions->enableLimitReport(); |
4452 | | - |
4453 | | - if ( $canonical ) { |
4454 | | - $parserOptions->setUserLang( $wgLanguageCode ); # Must be set explicitely |
4455 | | - return $parserOptions; |
4456 | | - } |
4457 | | - $this->mParserOptions = $parserOptions; |
| 4446 | + if ( !$this->mParserOptions ) { |
| 4447 | + $this->mParserOptions = new ParserOptions( $wgUser ); |
| 4448 | + $this->mParserOptions->setTidy( true ); |
| 4449 | + $this->mParserOptions->enableLimitReport(); |
4458 | 4450 | } |
4459 | 4451 | |
4460 | 4452 | // Clone to allow modifications of the return value without affecting |
Index: branches/REL1_17/phase3/RELEASE-NOTES |
— | — | @@ -484,9 +484,6 @@ |
485 | 485 | as wikitext on preview. |
486 | 486 | * Page existence is now not revealed (in the colour of the tabs) to users who cannot |
487 | 487 | read the page in question. |
488 | | -* (bug 14404) The articles are now always saved with the default options. Articles |
489 | | - with {{int:X}} will have consistent table links no matter the preferences of the |
490 | | - last saving user. |
491 | 488 | * (bug 22753) Output from update.php is more clear when things changed, entries |
492 | 489 | indicating nothing changed are now all prefixed by "..." |
493 | 490 | * (bug 16019) $wgArticlePath = "/$1" no longer breaks API edit/watch actions |