X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=api.php;h=2a6a095de1ada9c3b2026e7a33936be327623d3a;hb=0b191ba97050b0094d7d6c577968a5868498b4cb;hp=80abc35c6620fd243b1bb25eac2cb79e754ba60a;hpb=227204c69b59dda16c6011002f8f3db7a874ded1;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index 80abc35c66..2a6a095de1 100644 --- a/api.php +++ b/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() );