You are here

function hosting_get_hostmaster_nid in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 hosting.inc \hosting_get_hostmaster_nid()
  2. 7.3 hosting.inc \hosting_get_hostmaster_nid()

Helper function to get the node ID of the Aegir front-end site.

3 calls to hosting_get_hostmaster_nid()
drush_hosting_post_pm_enable in ./hosting.drush.inc
Implements drush_hook_post_COMMAND().
hosting_add_task in task/hosting_task.module
Helper function to generate new task node
hosting_features_form_submit in ./hosting.features.inc
Submit callback for the Hosting features form.

File

./hosting.inc, line 110
General purpose Hosting module functions.

Code

function hosting_get_hostmaster_nid() {
  return db_result(db_query('SELECT site.nid FROM hosting_site site JOIN hosting_package_instance pkgi ON pkgi.rid=site.nid JOIN hosting_package pkg ON pkg.nid=pkgi.package_id WHERE pkg.short_name="hostmaster"'));
}