function hostingService_http_pack::load in Hosting 6.2
Same name and namespace in other branches
- 7.4 web_pack/hosting_web_pack.service.inc \hostingService_http_pack::load()
- 7.3 web_pack/hosting_web_pack.service.inc \hostingService_http_pack::load()
Overrides hostingService::load
File
- web_pack/
hosting_web_pack.service.inc, line 41
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 = %d', $this->server->vid);
while ($web_server = db_fetch_object($result)) {
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),
));
}