You are here

function hosting_ssl_nodeapi_site_view in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_nodeapi_site_view()
  2. 7.3 web_server/ssl/hosting_ssl.nodeapi.inc \hosting_ssl_nodeapi_site_view()

File

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) {
    $node->content['info']['ssl_key'] = array(
      '#type' => 'item',
      '#title' => t('Encryption key'),
      '#value' => 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,
    );
  }
}