Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/273591

Change subject: Revert "Remove RejectParserCacheValue hook handler"
......................................................................

Revert "Remove RejectParserCacheValue hook handler"

This reverts commit ffa729b007b6c4c7bc613c29f071cb42f885738f.

Change-Id: Icb80dfad1b046d1633ed0344b31ddab377dc9415
---
M extension.json
M includes/MobileFrontend.hooks.php
2 files changed, 20 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/91/273591/1

diff --git a/extension.json b/extension.json
index 9aed26a..167e5fc 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 5b7415d..856e4f3 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1308,6 +1308,23 @@
        }
 
        /**
+        * 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(), '<a href="#/editor/' ) !== 
false ) {
+                       // Bug T124356 parser cache corruption
+                       return false;
+               }
+
+               return true;
+       }
+
+       /**
         * Handler for Extension registration callback
         */
        public static function onRegistration() {

-- 
To view, visit https://gerrit.wikimedia.org/r/273591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb80dfad1b046d1633ed0344b31ddab377dc9415
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: wmf/1.27.0-wmf.14
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to