Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/97056


Change subject: Revert "Suppress section edit links with action=render"
......................................................................

Revert "Suppress section edit links with action=render"

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
---
M RELEASE-NOTES-1.23
M includes/Article.php
M includes/OutputPage.php
3 files changed, 1 insertion(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/97056/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 670e75e..ea0d22c 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -45,10 +45,6 @@
   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.
 
 === API changes in 1.23 ===
 * (bug 54884) action=parse&prop=categories now indicates hidden and missing
diff --git a/includes/Article.php b/includes/Article.php
index 1619e09..a6afd8e 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -1473,7 +1473,6 @@
         */
        public function render() {
                $this->getContext()->getOutput()->setArticleBodyOnly( true );
-               $this->getContext()->getOutput()->enableSectionEditLinks( false 
);
                $this->view();
        }
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 5ffb802..b4fda13 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -256,14 +256,9 @@
        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.
@@ -1617,7 +1612,6 @@
        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 );
@@ -3680,22 +3674,5 @@
         */
        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;
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/97056
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie65e3de84b44866e4ab1fc222a365cb3a9180ee1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.23wmf4
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to