jenkins-bot has submitted this change and it was merged.
Change subject: Removed the default tracking category, GWToolset Batch Upload.
......................................................................
Removed the default tracking category, GWToolset Batch Upload.
The default tracking category, GWToolset Batch Upload, will no
longer be automatically added to the wikitext of GWToolset uploads.
The Template:Uploaded_with_GWToolset, which is part of each upload’s
wikitext, will contain that tracking category.
Bug: T90859
Change-Id: I4fb105b324d281933397e6fafa436bb1da3505f4
---
M includes/Config.php
M includes/Handlers/Forms/MetadataMappingHandler.php
2 files changed, 6 insertions(+), 8 deletions(-)
Approvals:
Gilles: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Config.php b/includes/Config.php
index 57d175d..f5fc754 100644
--- a/includes/Config.php
+++ b/includes/Config.php
@@ -183,12 +183,6 @@
public static $metadata_sets_subpage = 'Metadata_Sets';
/**
- * @var {string}
- * category automatically added to items uploaded by GWToolset
- */
- public static $mediawiki_template_default_category = 'GWToolset Batch
Upload';
-
- /**
* @var {int}
*/
public static $preview_throttle = 3;
diff --git a/includes/Handlers/Forms/MetadataMappingHandler.php
b/includes/Handlers/Forms/MetadataMappingHandler.php
index 4654a5b..2e94aac 100644
--- a/includes/Handlers/Forms/MetadataMappingHandler.php
+++ b/includes/Handlers/Forms/MetadataMappingHandler.php
@@ -158,12 +158,16 @@
* an array of user options that was submitted in the html form
*/
protected function getGlobalCategories( array &$user_options ) {
- $user_options['categories'] =
Config::$mediawiki_template_default_category;
+ $user_options['categories'] = '';
if ( isset( $this->_whitelisted_post['gwtoolset-category'] ) ) {
foreach (
$this->_whitelisted_post['gwtoolset-category'] as $category ) {
if ( !empty( $category ) ) {
- $user_options['categories'] .=
Config::$category_separator . $category;
+ if ( empty( $user_options['categories']
) ) {
+ $user_options['categories'] .=
$category;
+ } else {
+ $user_options['categories'] .=
Config::$category_separator . $category;
+ }
}
}
}
--
To view, visit https://gerrit.wikimedia.org/r/193106
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4fb105b324d281933397e6fafa436bb1da3505f4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Dan-nl <[email protected]>
Gerrit-Reviewer: Dan-nl <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: Steinsplitter <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits