Yurik has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/275543

Change subject: Added cross-tag sharing flag
......................................................................

Added cross-tag sharing flag

Change-Id: Ieec30a8cbcd920d708390bb9e02665af2bfa000e
---
M extension.json
M includes/Tag/TagHandler.php
2 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/43/275543/1

diff --git a/extension.json b/extension.json
index 49663fd..2701722 100644
--- a/extension.json
+++ b/extension.json
@@ -201,6 +201,7 @@
                "tests/parserTests.txt"
        ],
        "config": {
+               "KartographerAllowCrossTagDataSharing": true,
                "KartographerDfltStyle": "osm-intl",
                "KartographerStyles": ["osm-intl", "osm"],
                "KartographerSrcsetScales": [1.3, 1.5, 2, 2.6, 3],
diff --git a/includes/Tag/TagHandler.php b/includes/Tag/TagHandler.php
index 2e75022..915085a 100644
--- a/includes/Tag/TagHandler.php
+++ b/includes/Tag/TagHandler.php
@@ -170,6 +170,14 @@
        }
 
        private function parseGroups() {
+               global $wgKartographerAllowCrossTagDataSharing;
+
+               if ( !$wgKartographerAllowCrossTagDataSharing ) {
+                       // if we ignore all the 'group' and 'show' parameters,
+                       // each tag stays private, and will be unable to share 
data
+                       return;
+               }
+
                $this->groupName = $this->getText( 'group', null, 
'/^[a-zA-Z0-9]+$/' );
 
                $text = $this->getText( 'show', null, 
'/^[a-zA-Z0-9]+(\s*,\s*[a-zA-Z0-9]+)*$/' );

-- 
To view, visit https://gerrit.wikimedia.org/r/275543
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieec30a8cbcd920d708390bb9e02665af2bfa000e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to