You are here

function hosting_package_update_6004 in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 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 414
Define database schema and update functions 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);
  }
}