Mollywhite has uploaded a new change for review.
https://gerrit.wikimedia.org/r/80237
Change subject: Bug 53164: Add variable to enable/disable navigtion bars.
......................................................................
Bug 53164: Add variable to enable/disable navigtion bars.
This allows the extension to be configured such that navigation
bars are not added to any pages.
Bug: 53164
Change-Id: I0360314f9b77fe37916d72a642027c733f14fca3
---
M BookManagerv2.hooks.php
M BookManagerv2.php
2 files changed, 14 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BookManagerv2
refs/changes/37/80237/1
diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index 0318dfe..7016d8b 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -377,7 +377,12 @@
public static function onBeforePageDisplay( OutputPage &$out, Skin
&$skin ) {
global $wgContentNamespaces,
$wgBookManagerv2NavigationNamespaces,
$wgBookManagerv2Metadata, $wgBookManagerv2ChapterList,
- $wgBookManagerv2PrevNext, $wgBookManagerv2JsonFrontend;
+ $wgBookManagerv2PrevNext, $wgBookManagerv2JsonFrontend,
+ $wgBookManagerv2NavigationBars;
+
+ if ( !$wgBookManagerv2NavigationBars ) {
+ return true;
+ }
// Navbars will be added to namespaces in the
// $wgBookManagerv2NavigationNamespaces array if it's set,
otherwise
diff --git a/BookManagerv2.php b/BookManagerv2.php
index 57a1b90..ed2505d 100644
--- a/BookManagerv2.php
+++ b/BookManagerv2.php
@@ -150,8 +150,15 @@
/**
* @var bool
+ * If disabled, navigation bars will not be added to any pages.
+ */
+$wgBookManagerv2NavigationBars = true;
+
+/**
+ * @var bool
* If enabled, this adds an example navigation bar to every mainspace
- * page, drawing the information from examples/book.json
+ * page, drawing the information from examples/book.json.
+ * $wgBookManagerv2NavigationBars must also be set to true.
*/
$wgBookManagerv2ExampleNavigation = false;
--
To view, visit https://gerrit.wikimedia.org/r/80237
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0360314f9b77fe37916d72a642027c733f14fca3
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