Esanders has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/345642 )
Change subject: Remove hard dependency on BetaFeatures
......................................................................
Remove hard dependency on BetaFeatures
Bug: T161829
Change-Id: I91fd695ab9d2e4b142c67884f5e8c83f3142d240
---
M extension.json
M includes/PopupsContext.php
2 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Popups
refs/changes/42/345642/1
diff --git a/extension.json b/extension.json
index 6814ab0..e917c0a 100644
--- a/extension.json
+++ b/extension.json
@@ -52,7 +52,7 @@
"PopupsBetaFeature": false,
"@PopupsSchemaSamplingRate": "@var number: Sample rate for
logging events to Schema:Popups.",
"PopupsSchemaSamplingRate": 0,
- "@PopupsHideOptInOnPreferencesPage": "@var bool: Whether the
option to senable/disable Page Previews should be hidden on Preferences page.
Please note if PopupsBetaFeature is set to true this option will be always
hidden. False by default",
+ "@PopupsHideOptInOnPreferencesPage": "@var bool: Whether the
option to enable/disable Page Previews should be hidden on Preferences page.
Please note if PopupsBetaFeature is set to true this option will be always
hidden. False by default",
"PopupsHideOptInOnPreferencesPage": false,
"@PopupsOptInDefaultState" : "@var string:['1'|'0'] Default
Page Previews visibility. Has to be a string as a compatibility with beta
feature settings",
"PopupsOptInDefaultState" : "0",
diff --git a/includes/PopupsContext.php b/includes/PopupsContext.php
index 6491759..c712bcd 100644
--- a/includes/PopupsContext.php
+++ b/includes/PopupsContext.php
@@ -44,14 +44,18 @@
const LOGGER_CHANNEL = 'popups';
/**
* User preference value for enabled Page Previews
+ * Identical to \HTMLFeatureField::OPTION_ENABLED in BetaFeatures
+ *
* @var string
*/
- const PREVIEWS_ENABLED = \HTMLFeatureField::OPTION_ENABLED;
+ const PREVIEWS_ENABLED = '1';
/**
* User preference value for disabled Page Previews
+ * Identical to \HTMLFeatureField::OPTION_DISABLED in BetaFeatures
+ *
* @var string
*/
- const PREVIEWS_DISABLED = \HTMLFeatureField::OPTION_DISABLED;
+ const PREVIEWS_DISABLED = '0';
/**
* User preference to enable/disable Page Previews
* Currently for BETA and regular opt in we use same preference name
--
To view, visit https://gerrit.wikimedia.org/r/345642
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91fd695ab9d2e4b142c67884f5e8c83f3142d240
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Popups
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits