Ejegg has submitted this change and it was merged.
Change subject: Fix check of banner logged-in status properties
......................................................................
Fix check of banner logged-in status properties
Change-Id: I8036e34f9367b33dd2f2b81bb5be1d117f58a815
---
M modules/ext.centralNotice.bannerController/bannerController.lib.js
M tests/data/AllocationsFixtures.json
2 files changed, 3 insertions(+), 6 deletions(-)
Approvals:
Ejegg: Looks good to me, approved
diff --git a/modules/ext.centralNotice.bannerController/bannerController.lib.js
b/modules/ext.centralNotice.bannerController/bannerController.lib.js
index 8548f70..84d9e08 100644
--- a/modules/ext.centralNotice.bannerController/bannerController.lib.js
+++ b/modules/ext.centralNotice.bannerController/bannerController.lib.js
@@ -311,12 +311,10 @@
}
// Filter for logged-in status
- if ( mw.centralNotice.data.anonymous &&
- ( banner.display_anon != 1 ) ) {
+ if ( mw.centralNotice.data.anonymous &&
!banner.display_anon ) {
continue;
}
- if ( !mw.centralNotice.data.anonymous &&
- ( banner.display_account != 1 )
) {
+ if ( !mw.centralNotice.data.anonymous
&& !banner.display_account ) {
continue;
}
diff --git a/tests/data/AllocationsFixtures.json
b/tests/data/AllocationsFixtures.json
index 4606f81..07b5673 100644
--- a/tests/data/AllocationsFixtures.json
+++ b/tests/data/AllocationsFixtures.json
@@ -16,8 +16,7 @@
"banners": [
{
"name": "b1",
- "weight": 5,
- "display_anon": 1
+ "weight": 5
}
]
}
--
To view, visit https://gerrit.wikimedia.org/r/175786
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8036e34f9367b33dd2f2b81bb5be1d117f58a815
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Mwalker <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits