function biblio_query_node_access_alter in Bibliography Module 7.2
Same name and namespace in other branches
- 7 biblio.module \biblio_query_node_access_alter()
Doesn't seem to do anything @todo remove if possible
@global object $user
Parameters
QueryAlterableInterface $query:
Return value
type
File
- ./
biblio.module, line 1091
Code
function biblio_query_node_access_alter(QueryAlterableInterface $query) {
global $user;
if (user_access('access biblio content', $user)) {
return;
}
$tables = $query
->getTables();
foreach ($tables as $alias => $table_info) {
if (!$table_info instanceof SelectQueryInterface) {
if ($table_info['table'] == 'node') {
$query
->condition($alias . '.type', 'biblio', '<>');
break;
}
}
}
}