aboutsummaryrefslogtreecommitdiffstats
path: root/includes/content
diff options
context:
space:
mode:
authorTim Starling <tstarling@wikimedia.org>2023-07-25 10:47:29 +1000
committerTim Starling <tstarling@wikimedia.org>2023-07-26 05:16:55 +0000
commit8d69f99a1afa709096c9a4addc14a42d6abacc6b (patch)
tree1e9ca9dc70273b70389a5d6a1debbf9975819b31 /includes/content
parent2b608a35ede101dbfe4c1195bd8776475fee722f (diff)
downloadmediawikicore-8d69f99a1afa709096c9a4addc14a42d6abacc6b.tar.gz
mediawikicore-8d69f99a1afa709096c9a4addc14a42d6abacc6b.zip
Don't show the inline toggle selector on Special:MobileDiff
Have Article opt in to inline toggle switch display, so that random callers of DifferenceEngine::showDiffPage() do not receive a non-functional format selector. Bug: T342158 Change-Id: Id4e38c2a20b5381e5f70b1244304da2895eaf8e7
Diffstat (limited to 'includes/content')
-rw-r--r--includes/content/ContentHandler.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/content/ContentHandler.php b/includes/content/ContentHandler.php
index 3d4b60fce347..1de61d4d37e2 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -723,6 +723,9 @@ abstract class ContentHandler {
}
$slotDiffRenderer->setFormat( $format );
$slotDiffRenderer->setTextDiffer( $textDiffer );
+ if ( $options['inline-toggle'] ?? false ) {
+ $slotDiffRenderer->setInlineToggleEnabled();
+ }
return $slotDiffRenderer;
}