You are here

function hosting_ssl_nodeapi_site_view in Hostmaster (Aegir) 6

File

modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc, line 92

Code

function hosting_ssl_nodeapi_site_view(&$node, $teaser = false) {
  $node->content['info']['ssl_enabled'] = array(
    '#type' => 'item',
    '#title' => t('Encryption'),
    '#value' => hosting_ssl_status_options(!is_null($node->ssl_enabled) ? $node->ssl_enabled : HOSTING_SSL_DISABLED),
    '#weight' => 6,
  );
  if ($node->ssl_enabled != 0) {
    $path = sprintf("config/ssl.d/%s/", hosting_ssl_get_key($node->ssl_key));
    $node->content['info']['ssl_key'] = array(
      '#type' => 'item',
      '#title' => t('Encryption key'),
      '#value' => hosting_ssl_output_key($node->ssl_key),
      '#description' => t("This site is using the SSL certificate and SSL key located at %crt_file and %key_file.", array(
        '%crt_file' => $path . 'openssl.crt',
        '%key_file' => $path . 'openssl.key',
      )),
      '#weight' => 7,
    );
  }
}