You are here

function hosting_package_update_6004 in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 package/hosting_package.install \hosting_package_update_6004()
  2. 7.3 package/hosting_package.install \hosting_package_update_6004()

File

package/hosting_package.install, line 386
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);
  }
}