function hostingService_http_pack::load in Hosting 7.3
Same name and namespace in other branches
- 6.2 web_pack/hosting_web_pack.service.inc \hostingService_http_pack::load()
- 7.4 web_pack/hosting_web_pack.service.inc \hostingService_http_pack::load()
Overrides hostingService::load
File
- web_pack/
hosting_web_pack.service.inc, line 48
Class
Code
function load() {
parent::load();
$ssl_enabled = TRUE;
$master_servers = array();
$slave_servers = array();
$result = db_query('SELECT web_server_nid, type FROM {hosting_web_pack} WHERE vid = :vid', array(
':vid' => $this->server->vid,
));
while ($web_server = $result
->fetch()) {
if ($web_server->type == 'master') {
$master_servers[] = $web_server->web_server_nid;
}
else {
$slave_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(
'master_servers' => drupal_map_assoc($master_servers),
));
$this
->setValues(array(
'slave_servers' => drupal_map_assoc($slave_servers),
));
}