jenkins-bot has submitted this change and it was merged.
Change subject: Use inNamespaces instead of comparing getNamespaces.
......................................................................
Use inNamespaces instead of comparing getNamespaces.
This is the preferred way, according to the docs.
Change-Id: I1192f8ff92d017975e6b0f5f7828d9c6db859e66
---
M BookManagerv2.hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Mwalker: Looks good to me, approved
jenkins-bot: Verified
diff --git a/BookManagerv2.hooks.php b/BookManagerv2.hooks.php
index 1d81902..e157d0b 100644
--- a/BookManagerv2.hooks.php
+++ b/BookManagerv2.hooks.php
@@ -36,7 +36,7 @@
*/
static function onEditFilterMerged( $editor, $text, &$error, $summary )
{
$pageTitle = $editor->getTitle();
- if ( $pageTitle->getNamespace() !== NS_BOOK ) {
+ if ( $pageTitle->inNamespace( NS_BOOK ) ) {
return true;
}
@@ -382,7 +382,7 @@
$navigationNamespaces = $wgContentNamespaces;
}
- if ( in_array( $out->getTitle()->getNamespace(),
$navigationNamespaces ) ) {
+ if ( $out->getTitle()->inNamespaces( $navigationNamespaces ) ) {
if ( $out->getRevisionId() !== null ) {
global $wgContLang,
$wgBookManagerv2ExampleNavigation, $wgMemc;
$categories = $out->getCategories();
--
To view, visit https://gerrit.wikimedia.org/r/77360
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1192f8ff92d017975e6b0f5f7828d9c6db859e66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BookManagerv2
Gerrit-Branch: master
Gerrit-Owner: Mollywhite <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits