function hosting_get_sites_by_status in Hostmaster (Aegir) 6
Retrieve sites on a specific platform, with a specific status
File
- modules/
hosting/ site/ hosting_site.module, line 342
Code
function hosting_get_sites_by_status($platform, $status) {
$nodes = array();
$result = db_query("SELECT nid FROM {hosting_site} WHERE platform=%d AND status = %d", $platform, $status);
while ($nid = db_fetch_object($result)) {
$nodes[$nid->nid] = node_load($nid->nid);
}
return $nodes;
}