summaryrefslogtreecommitdiff
path: root/includes/parser/ParserOutput.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-02-25 23:38:25 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-02-25 23:38:25 -0500
commitb0e5922cdadff2b394100dc8977bc2d526c04595 (patch)
treef1c19b1aaf0988cdef72f978b9f16c5d631d3727 /includes/parser/ParserOutput.php
parentad2b9dc3e492af9d550532817f34f865a97a8f63 (diff)
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Merge commit 'b88ab'
Diffstat (limited to 'includes/parser/ParserOutput.php')
-rw-r--r--includes/parser/ParserOutput.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php
index 502f0fd1..460f3211 100644
--- a/includes/parser/ParserOutput.php
+++ b/includes/parser/ParserOutput.php
@@ -55,6 +55,7 @@ class ParserOutput extends CacheTime {
private $mExtensionData = array(); # extra data used by extensions
private $mLimitReportData = array(); # Parser limit report data
private $mParseStartTime = array(); # Timestamps for getTimeSinceStart()
+ private $mPreventClickjacking = false; # Whether to emit X-Frame-Options: DENY
const EDITSECTION_REGEX = '#<(?:mw:)?editsection page="(.*?)" section="(.*?)"(?:/>|>(.*?)(</(?:mw:)?editsection>))#';
@@ -330,6 +331,7 @@ class ParserOutput extends CacheTime {
$this->addModuleMessages( $out->getModuleMessages() );
$this->mHeadItems = array_merge( $this->mHeadItems, $out->getHeadItemsArray() );
+ $this->mPreventClickjacking = $this->mPreventClickjacking || $out->getPreventClickjacking();
}
/**
@@ -629,4 +631,15 @@ class ParserOutput extends CacheTime {
function setLimitReportData( $key, $value ) {
$this->mLimitReportData[$key] = $value;
}
+
+ /**
+ * Get or set the prevent-clickjacking flag
+ *
+ * @since 1.24
+ * @param boolean|null $flag New flag value, or null to leave it unchanged
+ * @return boolean Old flag value
+ */
+ public function preventClickjacking( $flag = null ) {
+ return wfSetVar( $this->mPreventClickjacking, $flag );
+ }
}