dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9753f95
)
API: Also throw a warning when tokens for missing pages are denied
author
Roan Kattouw
<catrope@users.mediawiki.org>
Mon, 27 Oct 2008 12:16:47 +0000
(12:16 +0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Mon, 27 Oct 2008 12:16:47 +0000
(12:16 +0000)
includes/api/ApiQueryInfo.php
patch
|
blob
|
history
diff --git
a/includes/api/ApiQueryInfo.php
b/includes/api/ApiQueryInfo.php
index
e8b3563
..
fbea988
100644
(file)
--- a/
includes/api/ApiQueryInfo.php
+++ b/
includes/api/ApiQueryInfo.php
@@
-480,7
+480,9
@@
class ApiQueryInfo extends ApiQueryBase {
foreach($params['token'] as $t)
{
$val = call_user_func($tokenFunctions[$t], $pageid, $title);
- if($val !== false)
+ if($val === false)
+ $this->setWarning("Action '$t' is not allowed for the current user");
+ else
$res['query']['pages'][$pageid][$t . 'token'] = $val;
}
}