You are here

function hosting_get_default_profile in Hostmaster (Aegir) 6

2 calls to hosting_get_default_profile()
hosting_site_available_options in modules/hosting/site/hosting_site.form.inc
Pass in a site node and return an array of valid options for it's fields.
hosting_site_form in modules/hosting/site/hosting_site.form.inc
Implements hook_form().

File

modules/hosting/package/hosting_package.module, line 235

Code

function hosting_get_default_profile($default = null) {
  if ($p = hosting_get_package(variable_get('hosting_default_profile', 'default'))) {
    return $p->nid;
  }
  elseif ($p = hosting_get_package('standard')) {
    return $p->nid;
  }
  return $default;
}