function hosting_ssl_nodeapi_site_view in Hosting 7.3
Same name and namespace in other branches
- 6.2 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_nodeapi_site_view()
- 7.4 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_nodeapi_site_view()
Implements hook_nodeapi_TYPE_OP().
File
- web_server/
ssl/ hosting_ssl.nodeapi.inc, line 129 - NodeAPI functions for the Hosting SSL module.
Code
function hosting_ssl_nodeapi_site_view(&$node, $teaser = FALSE) {
$node->content['info']['ssl_enabled'] = array(
'#type' => 'item',
'#title' => t('Encryption'),
'#markup' => hosting_ssl_status_options(isset($node->ssl_enabled) ? $node->ssl_enabled : HOSTING_SSL_DISABLED),
'#weight' => 6,
);
if (isset($node->ssl_enabled) && $node->ssl_enabled == TRUE) {
$node->content['info']['ssl_key'] = array(
'#type' => 'item',
'#title' => t('Encryption key'),
'#markup' => hosting_ssl_output_key($node->ssl_key),
'#description' => hosting_ssl_get_key($node->ssl_key) ? t("This site is using SSL certificates located at %path.", array(
'%path' => sprintf("config/ssl.d/%s/", hosting_ssl_output_key($node->ssl_key)),
)) : t("(key deleted)"),
'#weight' => 7,
);
}
}