Oetterer has uploaded a new change for review.
https://gerrit.wikimedia.org/r/273953
Change subject: changed CargoStore's handling of boolean values. now accepts 0,
no and your wiki locale equivalent of no as false
......................................................................
changed CargoStore's handling of boolean values. now accepts 0, no and your
wiki locale equivalent of no as false
Change-Id: Ib98c325264f33dee87e8a43382e6b5d7357013d0
---
M parserfunctions/CargoStore.php
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo
refs/changes/53/273953/1
diff --git a/parserfunctions/CargoStore.php b/parserfunctions/CargoStore.php
index 2c4c49e..23cf72f 100644
--- a/parserfunctions/CargoStore.php
+++ b/parserfunctions/CargoStore.php
@@ -242,7 +242,11 @@
$msgForNo = wfMessage( 'htmlform-no' )->text();
if ( $curValue === '' || $curValue === null ) {
// Do nothing.
- } elseif ( $curValue === 0 || strtolower(
$curValue ) == strtolower( $msgForNo ) ) {
+ } elseif ( $curValue === 0
+ || $curValue === '0'
+ || strtolower( $curValue ) === 'no'
+ || strtolower( $curValue ) ==
strtolower( $msgForNo ) )
+ {
$tableFieldValues[$fieldName] = '0';
} else {
$tableFieldValues[$fieldName] = '1';
--
To view, visit https://gerrit.wikimedia.org/r/273953
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib98c325264f33dee87e8a43382e6b5d7357013d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Oetterer <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits