function hosting_get_hostmaster_site_nid

7.x-3.x hosting.inc hosting_get_hostmaster_site_nid()

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

5 calls to hosting_get_hostmaster_site_nid()
hook_hosting_task_guarded_nodes in ./hosting.api.php
Return a list of Aegir entities to guard against destructive tasks.
hosting_feature_rebuild_caches in ./hosting.features.inc
Perform necessary task after enabling or disabling Hosting features.
hosting_get_hostmaster_nid in ./hosting.inc
Shim to preserve API stability. Deprecated. Use hosting_get_hostmaster_site_nid().
hosting_get_hostmaster_platform_nid in ./hosting.inc
Helper function to get the node ID of the Aegir platform.
hosting_task_hosting_task_guarded_nodes in task/hosting_task.module
Implements hook_hosting_task_guarded_nodes().

File

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

Code

function hosting_get_hostmaster_site_nid() {
  return 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\'')->fetchField();
}