[Bug 47046] API gives spurious unrecognized parameter warnings for parameters added by extensions

2013-04-16 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47046

--- Comment #2 from Brad Jorsch bjor...@wikimedia.org ---
(In reply to comment #1)
 You should use the 'APIGetAllowedParams' hook to add the params, than
 extractRequestParams() will extract and validate it and marked it as used,
 than
 you have not a problem with unrecognized parameters.

I think you are not up to date on the $flags parameter that was recently
added to APIGetAllowedParams.

Also keep in mind that some very strange things should not show up in the
auto-generated help, e.g. how ConfirmEdit copies captchaid to wgCaptchaId.

But perhaps the thing to do is to require anything using APIGetAllowedParams to
include its parameters when $flags is 0, and live with modules possibly getting
extra parameters returned in extractRequestParams(). I'm not sure.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47046] API gives spurious unrecognized parameter warnings for parameters added by extensions

2013-04-13 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47046

Umherirrender umherirrender_de...@web.de changed:

   What|Removed |Added

 CC||umherirrender_de...@web.de

--- Comment #1 from Umherirrender umherirrender_de...@web.de ---
You should use the 'APIGetAllowedParams' hook to add the params, than
extractRequestParams() will extract and validate it and marked it as used, than
you have not a problem with unrecognized parameters.

With 'APIGetParamDescription' you can add help for the autodoc and
action=paraminfo

All other ways are not the common way, so you have to live with such warnings
and maybe other things.

Do you want a new hook, when ApiMain::getParamsUsed is called, to add your own
parameters there and avoid the warning? Use the first hook, makes live easier,
because the api will validate you param and die in a documented way for invalid
input.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 47046] API gives spurious unrecognized parameter warnings for parameters added by extensions

2013-04-10 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=47046

Andre Klapper aklap...@wikimedia.org changed:

   What|Removed |Added

   Priority|Unprioritized   |Low

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l