summaryrefslogtreecommitdiff
path: root/inc/auth.php
diff options
context:
space:
mode:
authorGuillaume Turri <guillaume.turri@gmail.com>2013-01-06 10:18:17 +0100
committerGuillaume Turri <guillaume.turri@gmail.com>2013-01-06 10:30:10 +0100
commitdef492a2d77af9effca204483b570061202cda5b (patch)
treeabdda5c22217aa3fe972c9b33b341c20a18d2250 /inc/auth.php
parent27beeed6dddad3cd88bba7ba5ddba653ec86e0ff (diff)
downloadrpg-def492a2d77af9effca204483b570061202cda5b.tar.gz
rpg-def492a2d77af9effca204483b570061202cda5b.tar.bz2
Made auth_aclcheck always return int
The returned type is important in particular when we deal with xmlrpc. Indeed, this value is directly returned to the client eg when the wiki.getAllPages method is queried. Currently the 'perms' attribute may be either an int or a string, and its up to the xmlrpc client to resolve it (although Dokuwiki's documentation only tells it can be an int). This patch makes sure we'll always return perms as int.
Diffstat (limited to 'inc/auth.php')
-rw-r--r--inc/auth.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/auth.php b/inc/auth.php
index 9c458338d..c68a699fe 100644
--- a/inc/auth.php
+++ b/inc/auth.php
@@ -580,7 +580,7 @@ function auth_aclcheck($id, $user, $groups) {
}
if($perm > -1) {
//we had a match - return it
- return $perm;
+ return (int) $perm;
}
}
@@ -610,7 +610,7 @@ function auth_aclcheck($id, $user, $groups) {
}
//we had a match - return it
if($perm != -1) {
- return $perm;
+ return (int) $perm;
}
}
//get next higher namespace