From: jenkins-bot Date: Thu, 31 Jul 2014 17:32:35 +0000 (+0000) Subject: Merge "Api request log: improve module retrieval" X-Git-Tag: 1.31.0-rc.0~14642 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=78d5e9f526bdb2e49379c101080906372c911097;hp=b59fe387766b1aaf117f04abd7e3a070f2e11b11;p=lhc%2Fweb%2Fwiklou.git Merge "Api request log: improve module retrieval" --- 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() );