From: Platonides Date: Thu, 15 Sep 2011 21:09:04 +0000 (+0000) Subject: Follow up r89706, building up on r97091. X-Git-Tag: 1.31.0-rc.0~27625 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=1e4a90bddac915ab621062cda36bb3a5ca53ce15;p=lhc%2Fweb%2Fwiklou.git Follow up r89706, building up on r97091. I think this should fix the issues while keeping bug 14404 solved. We may need now a more advanced test than ArticleTablesTest::testbug14404() thoigh. --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index c177115634..0037439e0e 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1984,7 +1984,7 @@ class WikiPage extends Page { $edit->revid = $revid; $edit->newText = $text; $edit->pst = $this->preSaveTransform( $text, $user, $popts ); - $edit->popts = $this->getParserOptions( true ); + $edit->popts = $this->makeParserOptions( new User ); $edit->output = $wgParser->parse( $edit->pst, $this->mTitle, $edit->popts, true, true, $revid ); $edit->oldText = $this->getRawText(); @@ -2563,13 +2563,11 @@ class WikiPage extends Page { * Get parser options suitable for rendering the primary article wikitext * @param $canonical boolean Determines that the generated options must not depend on user preferences (see bug 14404) * @return mixed ParserOptions object or boolean false - * @deprecated since 1.19 */ - public function getParserOptions( $canonical = false ) { - global $wgUser, $wgLanguageCode; - if ( !$this->mParserOptions || $canonical ) { - $user = !$canonical ? $wgUser : new User; - $this->mParserOptions = $this->makeParserOptions( $user ); + public function getParserOptions() { + global $wgUser; + if ( !$this->mParserOptions ) { + $this->mParserOptions = $this->makeParserOptions( $wgUser ); } // Clone to allow modifications of the return value without affecting cache return clone $this->mParserOptions;