Jdlrobson has uploaded a new change for review. https://gerrit.wikimedia.org/r/277425
Change subject: Reapply "Remove RejectParserCacheValue hook handler" ...................................................................... Reapply "Remove RejectParserCacheValue hook handler" This reverts commit ff7a76d7197018525dd7e2a6114adf65b73956cf. Change-Id: I113e31bcf1b4fe646ef5d490e3e9d6d84a2c6249 --- M extension.json M includes/MobileFrontend.hooks.php 2 files changed, 21 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/25/277425/1 diff --git a/extension.json b/extension.json index cfbcf6f..fd7e954 100644 --- a/extension.json +++ b/extension.json @@ -1961,6 +1961,9 @@ ], "TitleSquidURLs": [ "MobileFrontendHooks::onTitleSquidURLs" + ], + "RejectParserCacheValue": [ + "MobileFrontendHooks::onRejectParserCacheValue" ] }, "config": { diff --git a/includes/MobileFrontend.hooks.php b/includes/MobileFrontend.hooks.php index 7e72b4c..f93958b 100644 --- a/includes/MobileFrontend.hooks.php +++ b/includes/MobileFrontend.hooks.php @@ -1333,6 +1333,24 @@ } /** + * Remove corruption caused by T124356 from the parser cache + * + * @param ParserOutput $value + * @param WikiPage $wikiPage + * @param ParserOptions $popts + * @return bool + */ + public static function onRejectParserCacheValue( $value, $wikiPage, $popts ) { + if ( strpos( $value->getRawText(), 'edit-page' ) !== false ) { + // Bug T124356 parser cache corruption + RequestContext::getMain()->getStats()->increment( 'T124356' ); + return false; + } + + return true; + } + + /** * Handler for Extension registration callback */ public static function onRegistration() { -- To view, visit https://gerrit.wikimedia.org/r/277425 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I113e31bcf1b4fe646ef5d490e3e9d6d84a2c6249 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/MobileFrontend Gerrit-Branch: master Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits