Skip Menu |

This queue is for tickets about the MediaWiki-API CPAN distribution.

Report information
The Basics
Id: 75296
Status: resolved
Priority: 0/
Queue: MediaWiki-API

People
Owner: Nobody in particular
Requestors: cariaso [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: enabling GET for non-standard actions
http://semantic-mediawiki.org/ enables 'ask' and 'askargs' via the api. But MediaWiki::Bot clients are forced to always POST instead of GET, because MediaWiki::API uses a hardcoded whitelist of GETable methods. The simplest fix is to add 2 more lines to the 'api' subroutine's whitelisting variable. my $get_actions = { 'ask' => 1, # new for Semantic-Mediawiki 'askargs' => 1, # new for Semantic-Mediawiki 'query' => 1, 'logout' => 1, 'purge' => 1, 'paraminfo' => 1 }; http://www.snpedia.com/api.php is a working reference system. It shows that I have at least these extra actions due to various extensions. smwinfo, ask, askargs, sfautocomplete, sfautoedit, titleblacklist, addsurvey, deletesurvey, editsurvey, submitsurvey but its make this data structure modifyable at runtime, so other actions can be specified.
From: cariaso [...] gmail.com
fixing my poor writing at the end of the initial report. "but it (would be better to) make this data structure modifyable at runtime, so other actions can be specified. "
On Sat Feb 25 02:14:48 2012, cariaso wrote: Show quoted text
> fixing my poor writing at the end of the initial report. > > "but it (would be better to) make this data structure modifyable at > runtime, so other actions can be specified. > " >
with version 0.38 being uploaded now there is now a hashref of get actions - MediaWiki::API->{config}->{get_actions} that you can add/delete to or override.