function hosting_https_nodeapi_site_update in Aegir HTTPS 7.3
Implements hook_nodeapi_TYPE_OP().
File
- ./
hosting_https.nodeapi.inc, line 242 - NodeAPI functions for the Hosting HTTPS module.
Code
function hosting_https_nodeapi_site_update($node) {
// Check if there's existing record.
$result = db_query("SELECT https_enabled FROM {hosting_https_site} WHERE vid = :vid", array(
':vid' => $node->vid,
));
if (!($obj = $result
->fetch())) {
hosting_https_nodeapi_site_insert($node);
}
else {
db_update('hosting_https_site')
->fields(array(
'https_enabled' => $node->https_enabled,
'client_authentication' => $node->https_client_authentication_enabled,
'client_authentication_path' => $node->https_client_authentication_path,
))
->condition('vid', $node->vid)
->execute();
}
}