function hosting_ssl_nodeapi_site_update in Hostmaster (Aegir) 6
File
- modules/
hosting/ web_server/ ssl/ hosting_ssl.nodeapi.inc, line 202
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 {
db_query("UPDATE {hosting_ssl_site} SET ssl_enabled=%d, ssl_key=%d WHERE vid=%d", $node->ssl_enabled, hosting_ssl_save_key($node->ssl_key, $node->ssl_enabled, $node->client), $node->vid);
}
}