You are here

function hostingService_http_cluster::load in Hosting 7.3

Same name and namespace in other branches
  1. 6.2 web_cluster/hosting_web_cluster.service.inc \hostingService_http_cluster::load()
  2. 7.4 web_cluster/hosting_web_cluster.service.inc \hostingService_http_cluster::load()

Overrides hostingService::load

File

web_cluster/hosting_web_cluster.service.inc, line 37

Class

hostingService_http_cluster

Code

function load() {
  parent::load();
  $ssl_enabled = TRUE;
  $web_servers = array();
  $result = db_query('SELECT web_server_nid FROM {hosting_web_cluster} WHERE vid = :vid', array(
    ':vid' => $this->server->vid,
  ));
  while ($web_server = $result
    ->fetch()) {
    $web_servers[] = $web_server->web_server_nid;
    $server = node_load($web_server->web_server_nid);
    $ssl_enabled = $ssl_enabled && $server->services['http']->ssl_enabled;
  }
  $this->ssl_enabled = $ssl_enabled;
  $this
    ->setValues(array(
    'web_servers' => drupal_map_assoc($web_servers),
  ));
}