Merge "Api request log: improve module retrieval"
This commit is contained in:
commit
78d5e9f526
1 changed files with 7 additions and 2 deletions
9
api.php
9
api.php
|
|
@ -108,8 +108,13 @@ if ( $wgAPIRequestLog ) {
|
|||
);
|
||||
$items[] = $wgRequest->wasPosted() ? 'POST' : 'GET';
|
||||
if ( $processor ) {
|
||||
$module = $processor->getModule();
|
||||
if ( $module->mustBePosted() ) {
|
||||
try {
|
||||
$manager = $processor->getModuleManager();
|
||||
$module = $manager->getModule( $wgRequest->getVal( 'action' ), 'action' );
|
||||
} catch ( Exception $ex ) {
|
||||
$module = null;
|
||||
}
|
||||
if ( !$module || $module->mustBePosted() ) {
|
||||
$items[] = "action=" . $wgRequest->getVal( 'action' );
|
||||
} else {
|
||||
$items[] = wfArrayToCgi( $wgRequest->getValues() );
|
||||
|
|
|
|||
Loading…
Reference in a new issue