function hosting_ssl_nodeapi_site_update in Hosting 6.2
Same name and namespace in other branches
- 7.4 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_nodeapi_site_update()
- 7.3 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_nodeapi_site_update()
File
- web_server/
ssl/ hosting_ssl.nodeapi.inc, line 212
Code
function hosting_ssl_nodeapi_site_update($node) {
// check if an existing record is there
$result = db_query("SELECT ssl_enabled FROM {hosting_ssl_site} WHERE vid=%d", $node->vid);
if (!($obj = db_fetch_object($result))) {
hosting_ssl_nodeapi_site_insert($node);
}
else {
if ($node->site_status == HOSTING_SITE_DELETED || !$node->ssl_enabled) {
hosting_ssl_clean_keys($node);
}
db_query("UPDATE {hosting_ssl_site} SET ssl_enabled=%d, ssl_key=%d WHERE vid=%d", $node->ssl_enabled, $node->ssl_key, $node->vid);
}
}