function _hosting_get_platforms in Hostmaster (Aegir) 6
Small helper function to get platforms that haven't been deleted.
7 calls to _hosting_get_platforms()
- hosting_migrate_platform in modules/
hosting/ migrate/ hosting_migrate.batch.inc - Batch migration of sites between platforms.
- hosting_package_update_5 in modules/
hosting/ package/ hosting_package.install - Denormalize package and package release node types
- hosting_platform_hosting_summary in modules/
hosting/ platform/ hosting_platform.module - Implementation of hook_hosting_summary().
- hosting_platform_listing in modules/
hosting/ platform/ hosting_platform.module - Simple list for top level navigation.
- hosting_site_form in modules/
hosting/ site/ hosting_site.form.inc - Implements hook_form().
File
- modules/
hosting/ platform/ hosting_platform.module, line 125 - Platform node type definition.
Code
function _hosting_get_platforms() {
$return = array();
$result = db_query("SELECT n.nid, n.title FROM {node} n LEFT JOIN {hosting_platform} h ON n.nid = h.nid \n WHERE n.type='platform' AND n.status=1 AND h.status <> %d ORDER BY n.title", HOSTING_PLATFORM_DELETED);
while ($server = db_fetch_object($result)) {
$return[$server->nid] = $server->title;
}
return $return;
}