You are here

domain_variable.install in Domain Variable 7

Installation file for I18n + Domain Variables Integration module.

File

domain_variable.install
View source
<?php

/**
 * @file
 * Installation file for I18n + Domain Variables Integration module.
 */

/**
 * Implements hook_requirements().
 */
function domain_variable_requirements($phase) {
  $t = get_t();
  $requirements = array();
  if ($phase == 'runtime' && variable_get('domain_sitename_override', 1)) {
    $requirements[] = array(
      'title' => $t('Override site name with name of domain.'),
      'value' => l($t('Enabled'), 'admin/structure/domain/settings'),
      'severity' => REQUIREMENT_WARNING,
      'description' => $t('The domain module is configured to override site names with the names of domains. For multilingual site names this override needs to be disabled. Note that you may have to manually update site names for all existing domains after disabling the override.'),
    );
  }
  return $requirements;
}

/**
 * Implements hook_install().
 */
function domain_variable_install() {

  // Set module weight for it to run before most modules, but after
  // variable_realm.
  db_update('system')
    ->fields(array(
    'weight' => -900,
  ))
    ->condition('name', 'domain_variable')
    ->condition('type', 'module')
    ->execute();
}

Functions