From: Kunal Mehta Date: Fri, 22 Sep 2017 09:05:15 +0000 (-0700) Subject: EditPage: Avoid unnecessary calls to Article::getContext() X-Git-Tag: 1.31.0-rc.0~1987^2~1 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22config_fonctions%22%2C%20%22image_process=%24process%22%29%20.%20%22?a=commitdiff_plain;h=f8d58ec3eaf6ad37899ee33b00517a151ab8b29e;p=lhc%2Fweb%2Fwiklou.git EditPage: Avoid unnecessary calls to Article::getContext() Change-Id: I18a7f3b3eb1a9b18ea6ca20ad43878f4740f4e47 --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 1588f822e1..a8ed19db94 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1684,7 +1684,7 @@ class EditPage { // Run new style post-section-merge edit filter if ( !Hooks::run( 'EditFilterMergedContent', - [ $this->mArticle->getContext(), $content, $status, $this->summary, + [ $this->context, $content, $status, $this->summary, $user, $this->minoredit ] ) ) { # Error messages etc. could be handled within the hook... @@ -3477,7 +3477,7 @@ class EditPage { $newContent = $oldContent->getContentHandler()->makeEmptyContent(); } - $de = $oldContent->getContentHandler()->createDifferenceEngine( $this->mArticle->getContext() ); + $de = $oldContent->getContentHandler()->createDifferenceEngine( $this->context ); $de->setContent( $oldContent, $newContent ); $difftext = $de->getDiff( $oldtitle, $newtitle ); @@ -3685,7 +3685,7 @@ class EditPage { $content2 = $this->toEditContent( $this->textbox2 ); $handler = ContentHandler::getForModelID( $this->contentModel ); - $de = $handler->createDifferenceEngine( $this->mArticle->getContext() ); + $de = $handler->createDifferenceEngine( $this->context ); $de->setContent( $content2, $content1 ); $de->showDiff( $this->context->msg( 'yourtext' )->parse(), @@ -3968,7 +3968,7 @@ class EditPage { * @return ParserOptions */ protected function getPreviewParserOptions() { - $parserOptions = $this->page->makeParserOptions( $this->mArticle->getContext() ); + $parserOptions = $this->page->makeParserOptions( $this->context ); $parserOptions->setIsPreview( true ); $parserOptions->setIsSectionPreview( !is_null( $this->section ) && $this->section !== '' ); $parserOptions->enableLimitReport();