Index: branches/wmf/1.17wmf1/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 | |
— | — | @@ -3582,7 +3582,7 @@ |
3583 | 3583 | $edit->revid = $revid; |
3584 | 3584 | $edit->newText = $text; |
3585 | 3585 | $edit->pst = $this->preSaveTransform( $text ); |
3586 | | - $edit->popts = $this->getParserOptions( true ); |
| 3586 | + $edit->popts = $this->getParserOptions(); |
3587 | 3587 | $edit->output = $wgParser->parse( $edit->pst, $this->mTitle, $edit->popts, true, true, $revid ); |
3588 | 3588 | $edit->oldText = $this->getContent(); |
3589 | 3589 | |
— | — | @@ -4423,23 +4423,15 @@ |
4424 | 4424 | |
4425 | 4425 | /** |
4426 | 4426 | * Get parser options suitable for rendering the primary article wikitext |
4427 | | - * @param $canonical boolean Determines that the generated must not depend on user preferences (see bug 14404) |
4428 | 4427 | * @return mixed ParserOptions object or boolean false |
4429 | 4428 | */ |
4430 | | - public function getParserOptions( $canonical = false ) { |
4431 | | - global $wgUser, $wgLanguageCode; |
| 4429 | + public function getParserOptions() { |
| 4430 | + global $wgUser; |
4432 | 4431 | |
4433 | | - if ( !$this->mParserOptions || $canonical ) { |
4434 | | - $user = !$canonical ? $wgUser : new User; |
4435 | | - $parserOptions = new ParserOptions( $user ); |
4436 | | - $parserOptions->setTidy( true ); |
4437 | | - $parserOptions->enableLimitReport(); |
4438 | | - |
4439 | | - if ( $canonical ) { |
4440 | | - $parserOptions->setUserLang( $wgLanguageCode ); # Must be set explicitely |
4441 | | - return $parserOptions; |
4442 | | - } |
4443 | | - $this->mParserOptions = $parserOptions; |
| 4432 | + if ( !$this->mParserOptions ) { |
| 4433 | + $this->mParserOptions = new ParserOptions( $wgUser ); |
| 4434 | + $this->mParserOptions->setTidy( true ); |
| 4435 | + $this->mParserOptions->enableLimitReport(); |
4444 | 4436 | } |
4445 | 4437 | |
4446 | 4438 | // Clone to allow modifications of the return value without affecting |
Index: branches/wmf/1.17wmf1/RELEASE-NOTES |
— | — | @@ -476,9 +476,6 @@ |
477 | 477 | as wikitext on preview. |
478 | 478 | * Page existence is now not revealed (in the colour of the tabs) to users who cannot |
479 | 479 | read the page in question. |
480 | | -* (bug 14404) The articles are now always saved with the default options. Articles |
481 | | - with {{int:X}} will have consistent table links no matter the preferences of the |
482 | | - last saving user. |
483 | 480 | * (bug 22753) Output from update.php is more clear when things changed, entries |
484 | 481 | indicating nothing changed are now all prefixed by "..." |
485 | 482 | * (bug 16019) $wgArticlePath = "/$1" no longer breaks API edit/watch actions |