replacing deprecated calls and references to capability calls

This commit is contained in:
toyomoyo
2006-09-20 09:00:04 +00:00
parent 759ac72de1
commit dc5586907d
17 changed files with 77 additions and 75 deletions
+10 -6
View File
@@ -1984,10 +1984,11 @@ function fetch_context_independent_capabilities() {
* context.
* @param obj $context
* @param int $roleid
* @param bool self - if set to true, resolve till this level, else stop at immediate parent level
* @return array
*/
function role_context_capabilities($roleid, $context, $cap='') {
global $CFG;
global $CFG;
$contexts = get_parent_contexts($context);
$contexts[] = $context->id;
@@ -1999,11 +2000,14 @@ function role_context_capabilities($roleid, $context, $cap='') {
$search = '';
}
$SQL = "SELECT rc.* FROM {$CFG->prefix}role_capabilities rc, {$CFG->prefix}context c
where rc.contextid in $contexts
and rc.roleid = $roleid
and rc.contextid = c.id $search
ORDER BY c.aggregatelevel DESC, rc.capability DESC";
$SQL = "SELECT rc.*
FROM {$CFG->prefix}role_capabilities rc,
{$CFG->prefix}context c
WHERE rc.contextid in $contexts
AND rc.roleid = $roleid
AND rc.contextid = c.id $search
ORDER BY c.aggregatelevel DESC,
rc.capability DESC";
$capabilities = array();