* here, there doesn't seem to be any other way to stop calling
* OutputPage::enableSectionEditLinks() and still have it work as it did before.
*/
- private $disableSectionEditForRender = false;
+ protected $viewIsRenderAction = false;
/**
* Constructor and clear the article
if ( $outputPage->isPrintable() ) {
$parserOptions->setIsPrintable( true );
$poOptions['enableSectionEditLinks'] = false;
- } elseif ( $this->disableSectionEditForRender
+ } elseif ( $this->viewIsRenderAction
|| !$this->isCurrent() || !$this->getTitle()->quickUserCan( 'edit', $user )
) {
$poOptions['enableSectionEditLinks'] = false;
public function render() {
$this->getContext()->getRequest()->response()->header( 'X-Robots-Tag: noindex' );
$this->getContext()->getOutput()->setArticleBodyOnly( true );
- $this->disableSectionEditForRender = true;
+ // We later set 'enableSectionEditLinks=false' based on this; also used by ImagePage
+ $this->viewIsRenderAction = true;
$this->view();
}