Revert "Suppress section edit links with action=render"
authorBrad Jorsch <bjorsch@wikimedia.org>
Fri, 22 Nov 2013 13:51:11 +0000 (08:51 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Fri, 22 Nov 2013 14:56:20 +0000 (09:56 -0500)
This reverts commit 2248021997324c8694430a3c010b8b81482be0c3.

That revision caused section edit links to be shown on views of old
revisions. See comments there for suggestions on reimplementing it.

Change-Id: Ie65e3de84b44866e4ab1fc222a365cb3a9180ee1

RELEASE-NOTES-1.23
includes/Article.php
includes/OutputPage.php

index 89b27ad..caa4e7c 100644 (file)
@@ -49,10 +49,6 @@ production.
   when the email address is already confirmed. Also, consistently use
   "confirmed", rather than "authenticated", when messaging whether or not the
   user has confirmed an email address.
-* (bug 19415) action=render no longer shows section edit links. This affects
-  behavior of several other features where (bogus) section edit links will
-  disappear, such as file description pages loaded via $wgUseInstantCommons or
-  pages transcluded cross-wiki via $wgEnableScaryTranscluding.
 * (bug 56912) Show correct link color on cached result of Special:DeadendPages.
 * Classes TitleListDependency and TitleDependency have been removed, as they
   have been found unused in core and extensions for a long time.
index 854f7f1..ecbc59f 100644 (file)
@@ -1478,7 +1478,6 @@ class Article implements Page {
         */
        public function render() {
                $this->getContext()->getOutput()->setArticleBodyOnly( true );
-               $this->getContext()->getOutput()->enableSectionEditLinks( false );
                $this->view();
        }
 
index 638887b..2c4c64e 100644 (file)
@@ -256,15 +256,10 @@ class OutputPage extends ContextSource {
        private $mTarget = null;
 
        /**
-        * @var bool: Whether parser output should contain table of contents
+        * @var bool: Whether output should contain table of contents
         */
        private $mEnableTOC = true;
 
-       /**
-        * @var bool: Whether parser output should contain section edit links
-        */
-       private $mEnableSectionEditLinks = true;
-
        /**
         * Constructor for OutputPage. This should not be called directly.
         * Instead a new RequestContext should be created and it will implicitly create
@@ -1617,7 +1612,6 @@ class OutputPage extends ContextSource {
        function addParserOutput( &$parserOutput ) {
                $this->addParserOutputNoText( $parserOutput );
                $parserOutput->setTOCEnabled( $this->mEnableTOC );
-               $parserOutput->setEditSectionTokens( $this->mEnableSectionEditLinks );
                $text = $parserOutput->getText();
                wfRunHooks( 'OutputPageBeforeHTML', array( &$this, &$text ) );
                $this->addHTML( $text );
@@ -3678,21 +3672,4 @@ $templates
        public function isTOCEnabled() {
                return $this->mEnableTOC;
        }
-
-       /**
-        * Enables/disables section edit links, doesn't override __NOEDITSECTION__
-        * @param bool $flag
-        * @since 1.23
-        */
-       public function enableSectionEditLinks( $flag = true ) {
-               $this->mEnableSectionEditLinks = $flag;
-       }
-
-       /**
-        * @return bool
-        * @since 1.23
-        */
-       public function sectionEditLinksEnabled() {
-               return $this->mEnableSectionEditLinks;
-       }
 }