Mollywhite has submitted this change and it was merged.
Change subject: Change NS_MAIN to $wgContentNamespaces.
......................................................................
Change NS_MAIN to $wgContentNamespaces.
Per suggestion from helder.wiki, check that the navigation bars
are being added to a namespace in $wgContentNamespaces, instead
of just checking that it's NS_MAIN.
Change-Id: If8c8bb21536ae64765b056fb685ad23b1909c2df
---
M BookManagerv2.hooks.php
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
Mollywhite: Verified; Looks good to me, approved
Helder.wiki: Looks good to me, but someone else must approve
jenkins-bot: Checked
diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index e0a12e6..69a32be 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -306,7 +306,8 @@
*/
public static function onBeforePageDisplay( OutputPage &$out, Skin
&$skin ) {
// Check that the navigation bar is only added to mainspace
pages.
- if ( $out->getTitle()->getNamespace() === NS_MAIN ) {
+ global $wgContentNamespaces;
+ if ( in_array( $out->getTitle()->getNamespace(),
$wgContentNamespaces ) ) {
if ( $out->getRevisionId() !== null ) {
global $wgContLang,
$wgBookManagerv2ExampleNavigation;
$categories = $out->getCategories();
--
To view, visit https://gerrit.wikimedia.org/r/74518
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If8c8bb21536ae64765b056fb685ad23b1909c2df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
Gerrit-Reviewer: Helder.wiki <[email protected]>
Gerrit-Reviewer: Mollywhite <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits