diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-07-31 06:43:27 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-07-31 06:43:27 +0200 |
commit | 027fc6e70f7f9ce8422d4798fb02e67ff271ae4c (patch) | |
tree | 8163dff509e80309c82051a1095faab9396e280f /includes/parser | |
parent | f80b2307028ed4d9231a0bd46496b241dcf4aa5c (diff) |
Update to MediaWiki 1.22.9
Diffstat (limited to 'includes/parser')
-rw-r--r-- | includes/parser/ParserOutput.php | 13 |
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 ); + } } |