Last modified: 2014-04-29 14:13:08 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 T50903, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48903 - Enable api to parse foo[]=a&foo[]=b as foo=a|b
Enable api to parse foo[]=a&foo[]=b as foo=a|b
Status: RESOLVED DUPLICATE of bug 10262
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-28 17:41 UTC by Carl Fürstenberg
Modified: 2014-04-29 14:13 UTC (History)
7 users (show)

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


Attachments

Description Carl Fürstenberg 2013-05-28 17:41:43 UTC
as mv.Api.post() renders {foo:['a','b']} as foo[]=a&foo[]=b, either the API should allow those alternative, or the JavaScript function should change to have special logic to handle api specific syntax so people doesn't have to type foo: 'a|b' manually. (complex cases might warrant dynamic props variable for example)
Comment 1 Brad Jorsch 2013-05-28 17:59:01 UTC
(In reply to comment #0)
> either the API should allow those alternative, or the JavaScript function
> should change to have special logic to handle api specific syntax

Or people could just supply the data in the correct format.


> so people doesn't have to type foo: 'a|b' manually.

Considering that's easier to type than "foo:['a','b']", I'm failing to understand why you're presenting this as a reason for your request.
Comment 2 Carl Fürstenberg 2013-05-28 18:22:36 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > either the API should allow those alternative, or the JavaScript function
> > should change to have special logic to handle api specific syntax
> 
> Or people could just supply the data in the correct format.
I would assume most programmers would think that it's perfectly logical to pass an array in those instances, and that either the module changes it to the "correct format" or that the api allows the normal syntax.
> 
> 
> > so people doesn't have to type foo: 'a|b' manually.
> 
> Considering that's easier to type than "foo:['a','b']", I'm failing to
> understand why you're presenting this as a reason for your request.

I'm referring to when you are building abstractions for the api in the code, where you might want to add a prop depending on the context. Also {foo:['a','b']} is imo easier to debug (syntax highlighting) than foo: 'a|b'.
Comment 3 Carl Fürstenberg 2013-11-22 01:27:12 UTC
Any chance this can be implemented?
Comment 4 Carl Fürstenberg 2014-04-28 20:53:55 UTC
*** Bug 64570 has been marked as a duplicate of this bug. ***
Comment 5 Brad Jorsch 2014-04-28 21:00:13 UTC

*** This bug has been marked as a duplicate of bug 10262 ***
Comment 6 Carl Fürstenberg 2014-04-28 21:03:29 UTC
This is not a dupe, bug 10262 was about changing the basic api interface, not about allowing additional interface for simplicity of clients
Comment 7 Brad Jorsch 2014-04-28 21:06:34 UTC
See bug 64570 comment 5. In short, your title here is a dup of bug 10262, while your comment 0 is collectively a dup of both bug 10262 and bug 64570. I'd prefer to keep the two bugs with clear focus (and possibly different resolutions) rather than this one.
Comment 8 Carl Fürstenberg 2014-04-28 21:09:10 UTC
(In reply to Brad Jorsch from comment #7)
> See bug 64570 comment 5. In short, your title here is a dup of bug 10262,
> while your comment 0 is collectively a dup of both bug 10262 and bug 64570.
> I'd prefer to keep the two bugs with clear focus (and possibly different
> resolutions) rather than this one.

Ah, I didn't see bug 64570 comment 5 before I reopened this one.
Comment 9 Brad Jorsch 2014-04-28 21:19:15 UTC
That's partially my fault: I closed this as a dup on reading the title, then actually read comment 0 here, then wrote comment 5 there, then came back here and saw you had already reopened. Sorry for the trouble.

If you agree that the other two bugs cover the issues, I'd like to re-close this bug, preferably as a duplicate of one of the two (since bugzilla won't let us mark it as a duplicate of both).
Comment 10 Carl Fürstenberg 2014-04-28 21:20:20 UTC
Yea, that's fine for me(In reply to Brad Jorsch from comment #9)
> That's partially my fault: I closed this as a dup on reading the title, then
> actually read comment 0 here, then wrote comment 5 there, then came back
> here and saw you had already reopened. Sorry for the trouble.
> 
> If you agree that the other two bugs cover the issues, I'd like to re-close
> this bug, preferably as a duplicate of one of the two (since bugzilla won't
> let us mark it as a duplicate of both).

Yea, that's fine to me
Comment 11 Brad Jorsch 2014-04-29 14:13:08 UTC
As noted above, this is an either-or duplicate of both bug 10262 and bug 64570.

*** This bug has been marked as a duplicate of bug 10262 ***

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


Navigation
Links