You are here

function hosting_platform_load in Hostmaster (Aegir) 6

Implementation of hook_load().

Parameters

node: Node object

File

modules/hosting/platform/hosting_platform.module, line 337
Platform node type definition.

Code

function hosting_platform_load($node) {
  $additions = db_fetch_object(db_query('SELECT publish_path, makefile, verified, web_server, status AS platform_status FROM {hosting_platform} WHERE vid = %d', $node->vid));
  $iid = db_result(db_query("SELECT iid FROM {hosting_package_instance} i left join {hosting_package} p on p.nid=i.package_id WHERE p.package_type='platform' AND i.rid=%d", $node->nid));
  $additions->release = hosting_package_instance_load($iid);
  $additions->profiles = hosting_get_profiles($node->nid, 'short_name');
  return $additions;
}