Last modified: 2013-01-06 11:55:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T34466, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32466 - Validator: 0 and 1 as valid boolean values.
Validator: 0 and 1 as valid boolean values.
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Validator (Other open bugs)
unspecified
All All
: Normal trivial (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-17 21:13 UTC by Van de Bugger
Modified: 2013-01-06 11:55 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Trivial implementation. (1.24 KB, patch)
2011-11-17 21:14 UTC, Van de Bugger
Details

Description Van de Bugger 2011-11-17 21:13:31 UTC
Don't you object if `0' and `1' are accepted as valid values for boolean arguments? It simplifies a bit my application. Trivial patch will be attached soon.
Comment 1 Van de Bugger 2011-11-17 21:14:32 UTC
Created attachment 9485 [details]
Trivial implementation.
Comment 2 Mark A. Hershberger 2011-11-18 17:39:21 UTC
Which extension is this? Maybe this one: http://www.mediawiki.org/wiki/Extension:Validator
Comment 3 Jeroen De Dauw 2011-11-18 18:17:02 UTC
Applied in r103602.

Vdb: Don't know if you are interested in poking at this, but the ParameterInput could use some nicer handling of boolean values. Right now it creates a dropdown with on, off, yes and no (and now 0 and 1 as well) instead of some checkbox or so. Either way, it should not have redundant values. (It's used on special:ask)
Comment 4 Van de Bugger 2011-11-18 19:26:51 UTC
> Which extension is this? Maybe this one: 
> http://www.mediawiki.org/wiki/Extension:Validator

Yes. `Validator' is not present in a list of extensions, so I had to select `[other]'.

> Vdb: Don't know if you are interested in poking at this, but the ParameterInput
> could use some nicer handling of boolean values. Right now it creates a
> dropdown with on, off, yes and no (and now 0 and 1 as well) instead of some
> checkbox or so. Either way, it should not have redundant values. (It's used on
> special:ask)

Sorry, did not get. 

I do not use `0' and `1' as primary input. Indeed, boolean variable, being inserted to text, looks either as `0' or `1'. So, accepting `0' and `1' allows do not care about boolean values, and do not convert it to `yes' and 'no' every time they go to text. Moreover, `0' and `1' are not case-sensitive and language dependent.

Do you mean I should pay attention to ParameterInput and fix it?
Comment 5 Jeroen De Dauw 2011-11-18 19:37:23 UTC
This is about an issue you did not cause, but is made somewhat worse by adding more values that get accepted by the boolean type. I'm just pointing out this is some bit-sized thing you could also fix if you'd like to.
Comment 6 Van de Bugger 2011-11-18 22:29:43 UTC
Ok, will look at that next week.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links