You are here

function hosting_update_7000 in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 hosting.install \hosting_update_7000()

Save 'aegir_hostmaster_site_nid' variable.

File

./hosting.install, line 557
Define database schemas and update functions for the hosting module.

Code

function hosting_update_7000() {
  $nid = 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();
  variable_set('aegir_hostmaster_site_nid', $nid);
}