function hosting_nodeapi_server_presave in Hosting 7.3
Same name and namespace in other branches
- 6.2 server/hosting_server.module \hosting_nodeapi_server_presave()
- 7.4 server/hosting_server.module \hosting_nodeapi_server_presave()
Implements hook_presave().
We notice the operator if no IP was given. We do not set any to allow operators to use SNI. We also fire up the regular services hooks.
File
- server/
hosting_server.module, line 480
Code
function hosting_nodeapi_server_presave(&$node) {
if (empty($node->ip_addresses)) {
// This returns an array or FALSE.
$ips = gethostbynamel($node->title);
if ($ips) {
drupal_set_message(t('No IP addresses provided for server. We guess the IP is %ip based on hostname %name. You should set IP addreses in the server node unless you are ready to use SNI (Server Name Indication) which is incompatible with IE and Safari on Windows XP.', array(
'%ip' => join(',', $ips),
'%name' => $node->title,
)), 'message');
}
}
hosting_server_services_from_post($node);
}