Add 'X-Robots-Tag: noindex' header in action=render pages
authorJuneHyeon Bae <devunt@gmail.com>
Fri, 23 May 2014 05:04:26 +0000 (14:04 +0900)
committerMatthew Flaschen <mflaschen@wikimedia.org>
Mon, 2 Jun 2014 20:04:51 +0000 (16:04 -0400)
Bug: 63891
Change-Id: I297a6269fcab999610bc01755462938c70eb64a1

RELEASE-NOTES-1.24
includes/Article.php
includes/actions/RenderAction.php

index cd77b0e..0389b7c 100644 (file)
@@ -122,6 +122,7 @@ changes to languages because of Bugzilla reports.
   $useHeadElement = false; is no longer supported and will not cause old keys
   like "headlinks", "skinnameclass", etc. to be defined.
 * The deprecated 'SpecialVersionExtensionTypes' hook was removed.
+* (bug 63891) Add 'X-Robots-Tag: noindex' header in action=render pages.
 
 ==== Renamed classes ====
 * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression
index bcdd0cf..4cf7d3e 100644 (file)
@@ -1494,6 +1494,7 @@ class Article implements Page {
         * Handle action=render
         */
        public function render() {
+               $this->getContext()->getRequest()->response()->header( 'X-Robots-Tag: noindex' );
                $this->getContext()->getOutput()->setArticleBodyOnly( true );
                $this->getContext()->getOutput()->enableSectionEditLinks( false );
                $this->view();
index c9b3f8f..16e407f 100644 (file)
@@ -41,7 +41,6 @@ class RenderAction extends FormlessAction {
        }
 
        public function show() {
-
                $this->page->render();
        }
 }