You are here

function hosting_package_update_6004 in Hostmaster (Aegir) 6

File

modules/hosting/package/hosting_package.install, line 381
Install, update and uninstall for the package management module.

Code

function hosting_package_update_6004() {
  if (!variable_get('hosting_package_update_6004_run', false)) {

    // we want to enforce that the hostmaster site is always referred to as @hostmaster
    $own_site = db_result(db_query("SELECT s.nid FROM {hosting_site} s LEFT JOIN {hosting_package} p ON s.profile=p.nid WHERE p.short_name='hostmaster'"));
    $records[$own_site] = 'hostmaster';
    foreach ($records as $nid => $name) {
      hosting_context_register($nid, $name);
    }
    variable_set('hosting_package_update_6004_run', true);
  }
}