function expire_get_domains in Cache Expiration 7
Same name and namespace in other branches
- 6 expire.module \expire_get_domains()
Get domains the node is currently published to
Parameters
$node: node object
Return value
array array('$gid' => $gid)
1 call to expire_get_domains()
- expire_get_base_urls in ./
expire.domain.inc - Get all base url's where this node can appear.
File
- ./
expire.domain.inc, line 11
Code
function expire_get_domains(&$node) {
$domains = array();
if ($node->nid) {
$result = db_query("SELECT gid FROM {domain_access} WHERE nid = :nid", array(
':nid' => $node->nid,
));
foreach ($result as $row) {
$domains[$gid] = $row->gid;
}
}
elseif ($node->mail && $node->name) {
$result = db_query("SELECT domain_id FROM {domain_editor} WHERE uid = :uid", array(
':uid' => $node->uid,
));
foreach ($result as $row) {
$domains[$gid] = $row->domain_id;
}
}
return $domains;
}