dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix URL protocol detection regex for file link= parameter
[lhc/web/wiklou.git]
/
api.php
diff --git
a/api.php
b/api.php
index
80abc35
..
2a6a095
100644
(file)
--- a/
api.php
+++ b/
api.php
@@
-108,8
+108,13
@@
if ( $wgAPIRequestLog ) {
);
$items[] = $wgRequest->wasPosted() ? 'POST' : 'GET';
if ( $processor ) {
);
$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() );
$items[] = "action=" . $wgRequest->getVal( 'action' );
} else {
$items[] = wfArrayToCgi( $wgRequest->getValues() );