Mollywhite has uploaded a new change for review.

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


Change subject: Bug 52331: Prevent navbars from appearing in diff view.
......................................................................

Bug 52331: Prevent navbars from appearing in diff view.

This checks to make sure the request is not a diff before
adding the navigation bars.

Bug: 52331
Change-Id: I1650b137d181a406284f39eb286674aa87035c38
---
M BookManagerv2.hooks.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BookManagerv2 
refs/changes/93/84293/1

diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index c4fcc00..368b89a 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -420,7 +420,9 @@
                        $wgBookManagerv2PrevNext, $wgBookManagerv2JsonFrontend,
                        $wgBookManagerv2NavigationBars;
 
-               if ( !$wgBookManagerv2NavigationBars ) {
+               $request = $out->getRequest();
+
+               if ( !$wgBookManagerv2NavigationBars || !is_null( 
$request->getCheck('wpDiff') ) ) {
                        return true;
                }
 
@@ -432,7 +434,7 @@
                } else {
                        $navigationNamespaces = $wgContentNamespaces;
                }
-
+               
                if ( $out->getTitle()->inNamespaces( $navigationNamespaces ) ) {
                        if ( $out->getRevisionId() !== null ) {
                                global $wgContLang, 
$wgBookManagerv2ExampleNavigation, $wgMemc;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1650b137d181a406284f39eb286674aa87035c38
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to