Commit 32e930ef authored by Adrian Rossouw's avatar Adrian Rossouw

Removing SSL modules from hosting. This will be treated as part of the web server service classes.

parent 95ed3279
<?php
function hosting_ssl_hosting_feature() {
$features['ssl'] = array(
'title' => t('SSL support'),
'description' => t('Provide SSL security to hosted sites.'),
'status' => HOSTING_FEATURE_DISABLED,
'module' => 'hosting_ssl',
'group' => 'experimental',
);
return $features;
}
<?php
function hosting_ssl_context_options(&$task) {
$task->context_options['ssl'] = $task->ref->ssl;
$task->context_options['ssl_redirect'] = $task->ref->ssl_redirect;
}
name = SSL
description = Allow Aegir to manage SSL certificates and sites.
package = Hosting
dependencies[] = hosting
dependencies[] = hosting_site
core = 6.x
<?php
/**
* @file
* SSL certificate management frontend
*/
function hosting_ssl_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'site_node_form') {
$form['port']['ssl'] = array('#type' => 'checkbox', '#title' => 'Enable SSL encryption', '#default_value' => $form['#node']->ssl, '#weight' => 4, '#attributes' => array('onClick' => 'if (!this.checked) { $("#edit-ssl-redirect").attr("checked", this.checked) };'),);
$form['port']['ssl_redirect'] = array('#type' => 'checkbox', '#title' => 'Redirect HTTP to HTTPS', '#default_value' => $form['#node']->ssl_redirect, '#weight' => 5, '#attributes' => array('onClick' => 'if (this.checked) { $("#edit-ssl").attr("checked", this.checked);}'),);
$form['port']['#title'] = t("Port and encryption");
}
}
function hosting_ssl_nodeapi(&$node, $op, $teaser, $page) {
switch($op) {
case 'view':
if ($node->type == 'site') {
$node->content['info']['ssl'] = array('#type' => 'item', '#title' => 'SSL encryption', '#value' => ( $node->ssl ? t('Enabled') : t('Disabled') ));
}
break;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment