Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit def492a2d77af9effca204483b570061202cda5b 1 parent 27beeed
@gturri gturri authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 inc/auth.php
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.