function hosting_init in Hosting 7.4
Same name and namespace in other branches
- 5 hosting.module \hosting_init()
 - 6.2 hosting.module \hosting_init()
 - 7.3 hosting.module \hosting_init()
 
Implements hook_init().
File
- ./
hosting.module, line 509  - Hosting module.
 
Code
function hosting_init() {
  static $already_called = FALSE;
  if ($already_called) {
    return;
  }
  $already_called = TRUE;
  // Definitions for the default platforms, clients etc.
  // Done to avoid using 'magic numbers'
  define('HOSTING_DEFAULT_CLIENT', variable_get('hosting_default_client', 1));
  define('HOSTING_DEFAULT_DB_SERVER', variable_get('hosting_default_db_server', 4));
  define('HOSTING_DEFAULT_WEB_SERVER', variable_get('hosting_default_web_server', 3));
  // This client has access to everything, see hosting_client.access.inc
  define('HOSTING_ADMIN_CLIENT', variable_get('hosting_admin_client', 1));
  define('HOSTING_OWN_DB_SERVER', variable_get('hosting_own_db_server', 2));
  define('HOSTING_OWN_WEB_SERVER', variable_get('hosting_own_web_server', 3));
  define('HOSTING_OWN_PLATFORM', variable_get('hosting_own_platform', 6));
  // Find the base URL, this is used by the initial 'hosting-setup' Drush
  // command. This gets defined in the bootstrap, so just using the global
  // definition.
  define('HOSTING_DEFAULT_BASE_URL', $GLOBALS['base_url']);
  // Moved from hook_menu()
  drupal_add_css(drupal_get_path('module', 'hosting') . '/hosting.css');
}