function _autoassignrole_path in Auto Assign Role 6
Same name and namespace in other branches
- 6.2 autoassignrole.module \_autoassignrole_path()
File
- ./
autoassignrole.module, line 334 - The main autoassignrole.module file
Code
function _autoassignrole_path($rid, $value) {
static $pages = array();
if (count($pages) == 0) {
$result = db_query("SELECT rid, display, path, title, description from {autoassignrole_page}");
while ($s = db_fetch_object($result)) {
$pages[$s->rid] = array(
'path' => $s->path,
'display' => $s->display,
'title' => $s->title,
'description' => $s->description,
);
}
return _autoassignrole_get_settings($rid, $value);
}
else {
if (isset($pages[$rid][$value])) {
$return = $pages[$rid][$value];
}
else {
$return = '';
}
return $return;
}
}