// At least it's a nid. A table with a field called nid is very
// very likely to be a node.nid in a node access query.
$fallback=$table;
}
}
}
}
}
// If there is nothing else, use the fallback.
if(!$base_table){
if($fallback){
watchdog('security','Your node listing query is using @fallback as a base table in a query tagged for node access. This might not be secure and might not even work. Specify foreign keys in your schema to node.nid ',array('@fallback'=>$fallback),WATCHDOG_WARNING);
$base_table=$fallback;
}
else{
thrownewException(t('Query tagged for node access but there is no nid. Add foreign keys to node.nid in schema to fix.'));
}
}
}
// Prevent duplicate records.
$query->distinct();
// Find all instances of the {node} table being joined -- could appear
// Find all instances of the base table being joined -- could appear
// more than once in the query, and could be aliased. Join each one to
$this->assertIdentical(isset($this->nids_visible[$nid]),$should_be_visible,strtr('A %private node by user %uid is %visible for user %current_uid on the %tid_is_private page.',array(