jenkins-bot has submitted this change and it was merged.

Change subject: Do not set default values for lat and lon
......................................................................


Do not set default values for lat and lon

Otherwise a location template is added with |0|0 coordinates (yeah! they
are valid) to each uploaded file if the user did not clear the input
fields that are hidden by default.

Can't set them to empty string, due to limtations in JsonSchema.
Setting them to null or empty string causes problems when editing
Campaign: pages

Regression introduced in 4a530c4b7341b9bb8409b194469f594f24fb5548

Bug: 51879
Change-Id: I1c3ddca19f36a7910f587a66f95b53d9facf4449
---
M UploadWizard.config.php
1 file changed, 10 insertions(+), 5 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/UploadWizard.config.php b/UploadWizard.config.php
index e0fb8ca..4280419 100644
--- a/UploadWizard.config.php
+++ b/UploadWizard.config.php
@@ -143,14 +143,19 @@
                // Initial value for the description field.
                'description' => '',
 
+               // These values are commented out by default, so they can be 
undefined
+               // Define them here if you want defaults.
+               // This is required, because the JsonSchema for these defines 
them to be type number
+               // But we can't have them to be NULL, because that's not a 
number.
+               // This is a technical limitation of JsonSchema, I think.
                // Initial value for the latitude field.
-               'lat' => 0,
+               //'lat' => 0,
 
-               // Initial value for the longitude field.
-               'lon' => 0,
+               //// Initial value for the longitude field.
+               //'lon' => 0,
 
-               // Initial value for the altitude field.
-               'alt' => 0,
+               //// Initial value for the altitude field.
+               //'alt' => 0,
        ),
 
        // 'uwLanguages' is a list of languages and codes, for use in the 
description step.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c3ddca19f36a7910f587a66f95b53d9facf4449
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Rillke <[email protected]>
Gerrit-Reviewer: Krinkle <[email protected]>
Gerrit-Reviewer: MarkTraceur <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot

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

Reply via email to