domain_get_node_match($nid)Get the best matching domain for a node link.
$nid The node id.
The domain array for the best matching domain for links to this node.
./domain.module, line 1196
<?php
function domain_get_node_match($nid) {
static $domain = array();
if (isset($domain[$nid])) {
return $domain[$nid];
}
// Load the domain data for this node -- but only take the first match.
$id = db_result(db_query_range("SELECT gid FROM {domain_access} WHERE nid = %d AND realm = '%s' ORDER BY gid", $nid, 'domain_id', 0, 1));
$source = domain_lookup($id);
drupal_alter('domain_source', $source, $nid);
$domain[$nid] = $source;
return $source;
}
?>