jenkins-bot has submitted this change and it was merged.
Change subject: Fix Fatal on various special pages introduced in 1.26.1
......................................................................
Fix Fatal on various special pages introduced in 1.26.1
Bug: T121892
Change-Id: Ie3d23af7a372fa6a5a23cd861a4d34e42fb08195
---
M RELEASE-NOTES-1.26
M includes/OutputPage.php
2 files changed, 20 insertions(+), 1 deletion(-)
Approvals:
Chad: Looks good to me, approved
jenkins-bot: Verified
diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26
index 379c41b..4b90040 100644
--- a/RELEASE-NOTES-1.26
+++ b/RELEASE-NOTES-1.26
@@ -1,6 +1,13 @@
Security reminder: If you have PHP's register_globals option set, you must
turn it off. MediaWiki will not work with it enabled.
+== MediaWiki 1.26.2 ==
+
+THIS IS NOT A RELEASE YET!
+
+== Changes since 1.26.1 ==
+* (T121892) Fix fatal error on some Special pages, introduced in 1.26.1.
+
== MediaWiki 1.26.1 ==
This is a maintenance release of the MediaWiki 1.26 branch.
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 552e181..69ed8de 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -236,6 +236,8 @@
/** @var int Cache stuff. Looks like mEnableClientCache */
protected $mSquidMaxage = 0;
+ /** @var int Upper limit on mCdnMaxage */
+ protected $mCdnMaxageLimit = INF;
/**
* @var bool Controls if anti-clickjacking / frame-breaking headers will
@@ -1945,7 +1947,17 @@
* @param int $maxage Maximum cache time on the Squid, in seconds.
*/
public function setSquidMaxage( $maxage ) {
- $this->mSquidMaxage = $maxage;
+ $this->mSquidMaxage = min( $maxage, $this->mCdnMaxageLimit );
+ }
+
+ /**
+ * Lower the value of the "s-maxage" part of the "Cache-control" HTTP
header
+ *
+ * @param int $maxage Maximum cache time on the CDN, in seconds
+ */
+ public function lowerCdnMaxage( $maxage ) {
+ $this->mCdnMaxageLimit = min( $maxage, $this->mCdnMaxageLimit );
+ $this->setSquidMaxage( $this->mSquidMaxage );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/260309
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3d23af7a372fa6a5a23cd861a4d34e42fb08195
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_26
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits