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
Merge "New hook ApiCheckCanExecute."
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiMain.php
diff --git
a/includes/api/ApiMain.php
b/includes/api/ApiMain.php
index
2a94a65
..
35febd9
100644
(file)
--- a/
includes/api/ApiMain.php
+++ b/
includes/api/ApiMain.php
@@
-761,6
+761,12
@@
class ApiMain extends ApiBase {
$this->dieReadOnly();
}
}
+
+ // Allow extensions to stop execution for arbitrary reasons.
+ $message = false;
+ if( !wfRunHooks( 'ApiCheckCanExecute', array( $module, $user, &$message ) ) ) {
+ $this->dieUsageMsg( $message );
+ }
}
/**