Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/284006
Change subject: Don't abuse onPageRenderingHash hook
......................................................................
Don't abuse onPageRenderingHash hook
After talking with BBlack I don't believe any of the contents of
this hook are necessary as lazy loaded images
nor image removal does not vary the parser cache - both transformations
happen in the MobileFormatter so rely on the HTML cache.
Change-Id: I343e5da5b416196147e83e517019c791cf678692
---
M extension.json
M includes/MobileFrontend.hooks.php
2 files changed, 0 insertions(+), 27 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/06/284006/1
diff --git a/extension.json b/extension.json
index 0e22c35..f840743 100644
--- a/extension.json
+++ b/extension.json
@@ -1910,9 +1910,6 @@
"ThumbnailBeforeProduceHTML": [
"MobileFrontendHooks::onThumbnailBeforeProduceHTML"
],
- "PageRenderingHash": [
- "MobileFrontendHooks::onPageRenderingHash"
- ],
"AfterBuildFeedLinks": [
"MobileFrontendHooks::onAfterBuildFeedLinks"
],
diff --git a/includes/MobileFrontend.hooks.php
b/includes/MobileFrontend.hooks.php
index 559019c..de65153 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -367,30 +367,6 @@
}
/**
- * PageRenderingHash hook handler
- * @see https://www.mediawiki.org/wiki/Manual:Hooks/PageRenderingHash
- *
- * @param string &$confstr Reference to a hash key string which can be
modified
- * @param User $user User object that is requesting the page
- * @param array &$forOptions Array of options used to generate the
$confstr hash key
- */
- public static function onPageRenderingHash( &$confstr, User $user,
&$forOptions ) {
- $context = MobileContext::singleton();
-
- if ( !$context->shouldDisplayMobileView() ) {
- return;
- }
-
- if ( $context->isLazyLoadImagesEnabled() ) {
- $confstr .= '!lazyloadimages';
- }
-
- if ( $context->imagesDisabled() ) {
- $confstr .= '!noimg';
- }
- }
-
- /**
* SkinPreloadExistence hook handler
* Disables TOC in output before it grabs HTML
* @see https://www.mediawiki.org/wiki/Manual:Hooks/SkinPreloadExistence
--
To view, visit https://gerrit.wikimedia.org/r/284006
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I343e5da5b416196147e83e517019c791cf678692
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits