Created
July 20, 2010 03:20
-
-
Save omega8cc/482440 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/drushrc.php /var/aegir/hostmaster-HEAD/drushrc.php | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/drushrc.php 2010-07-18 13:50:02.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/drushrc.php 2010-07-20 00:44:01.000000000 +0000 | |
@@ -1394,6 +1394,30 @@ $options['packages'] = array ( | |
'project' => '', | |
'version' => NULL, | |
), | |
+ 'hosting_nginx_ssl' => | |
+ array ( | |
+ 'filename' => '/var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/nginx/ssl/hosting_nginx_ssl.module', | |
+ 'basename' => 'hosting_nginx_ssl.module', | |
+ 'name' => 'hosting_nginx_ssl', | |
+ 'info' => | |
+ array ( | |
+ 'name' => 'Nginx +SSL servers', | |
+ 'description' => 'Allow hostmaster to configure NGINX web servers with SSL support.', | |
+ 'package' => 'Hosting', | |
+ 'dependencies' => | |
+ array ( | |
+ 0 => 'hosting_web_server', | |
+ 1 => 'hosting_ssl', | |
+ 2 => 'hosting_nginx', | |
+ ), | |
+ 'core' => '6.x', | |
+ 'version' => NULL, | |
+ 'php' => '4.3.5', | |
+ ), | |
+ 'schema_version' => 0, | |
+ 'project' => '', | |
+ 'version' => NULL, | |
+ ), | |
'hosting_nginx' => | |
array ( | |
'filename' => '/var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/nginx/hosting_nginx.module', | |
@@ -1456,7 +1480,7 @@ $options['packages'] = array ( | |
'version' => NULL, | |
'php' => '4.3.5', | |
), | |
- 'schema_version' => '6004', | |
+ 'schema_version' => '6005', | |
'project' => '', | |
'version' => NULL, | |
), | |
Only in /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster: .git | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/hostmaster.profile /var/aegir/hostmaster-HEAD/profiles/hostmaster/hostmaster.profile | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/hostmaster.profile 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/hostmaster.profile 2010-07-20 00:43:38.000000000 +0000 | |
@@ -34,7 +34,7 @@ function hostmaster_profile_tasks(&$task | |
// add support for nginx | |
if (d()->platform->server->http_service_type === 'nginx') { | |
- drupal_install_modules(array('hosting_nginx','hosting_ssl')); | |
+ drupal_install_modules(array('hosting_nginx','hosting_ssl','hosting_nginx_ssl')); | |
} | |
// Bootstrap and create all the initial nodes | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/migrate/hosting_migrate.batch.inc /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/migrate/hosting_migrate.batch.inc | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/migrate/hosting_migrate.batch.inc 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/migrate/hosting_migrate.batch.inc 2010-07-20 00:43:37.000000000 +0000 | |
@@ -197,7 +197,7 @@ function hosting_migrate_platform_batch( | |
$batch['form_state']['storage']['status'][$site->nid] = $status; | |
$batch['form_state']['storage']['instance'][$site->nid] = $profile_instance->iid; | |
// If there were no errors, this site passes and can be migrated | |
- if (!$status['error'] && $profile->title != 'hostmaster') { // The hostmaster site can not be upgraded via the interface. | |
+ if (!$status['error'] && $profile->short_name != 'hostmaster') { // The hostmaster site can not be upgraded via the interface. | |
$batch['form_state']['storage']['passed'][$site->nid] = $site->title; | |
return true; | |
} | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/package/hosting_package.module /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/package/hosting_package.module | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/package/hosting_package.module 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/package/hosting_package.module 2010-07-20 00:43:37.000000000 +0000 | |
@@ -101,7 +101,7 @@ function hosting_package_access($op, $no | |
} | |
} | |
-function hosting_get_profiles($platform = NULL) { | |
+function hosting_get_profiles($platform = NULL, $field = 'title') { | |
$profiles = array(); | |
if (!is_null($platform)) { | |
$instances = hosting_package_instances_load(array( | |
@@ -109,24 +109,57 @@ function hosting_get_profiles($platform | |
'n.status' => 1)); | |
foreach ($instances as $iid => $instance) { | |
- $profiles[$instance->package_id] = $instance->title; | |
+ $profiles[$instance->package_id] = $instance->$field; | |
} | |
} | |
else { | |
- $result = db_query("SELECT n.nid, n.title FROM {node} n LEFT JOIN {hosting_package} p ON n.vid = p.vid WHERE p.package_type = 'profile'"); | |
- while ($profile = db_fetch_object($result)) { | |
- $profiles[$profile->nid] = $profile->title; | |
+ $instances = hosting_package_instances_load(array( | |
+ 'package_type' => 'profile', | |
+ 'n.status' => 1, | |
+ 'r.type' => 'platform')); | |
+ | |
+ foreach ($instances as $iid => $instance) { | |
+ $profiles[$instance->package_id] = $instance->$field; | |
} | |
} | |
return $profiles; | |
} | |
+ | |
+function hosting_get_profile_platforms($profile) { | |
+ $defaults = array('default', 'standard', 'minimal'); | |
+ | |
+ $platforms = array(); | |
+ $instances = hosting_package_instances_load(array( | |
+ 'package_id' => $profile, | |
+ 'n.status' => 1, | |
+ 'r.status' => 1, | |
+ 'r.type' => 'platform')); | |
+ | |
+ foreach ($instances as $iid => $instance) { | |
+ $platform = node_load($instance->rid); | |
+ // this is one of the default profiles | |
+ if (in_array($instance->short_name, $defaults) && | |
+ sizeof(array_diff(array_values($platform->profiles), $defaults)) && | |
+ variable_get('hosting_ignore_default_profiles', TRUE)) { | |
+ // there are other profiles available on this platform. skip this. | |
+ continue; | |
+ } | |
+ if ($platform->platform_status != HOSTING_PLATFORM_DELETED) { | |
+ $platforms[$instance->rid] = $platform->title; | |
+ } | |
+ } | |
+ | |
+ return $platforms; | |
+} | |
+ | |
function hosting_get_profile_languages($profile = NULL, $platform = NULL) { | |
+ $languages['en'] = _hosting_language_name('en'); | |
if ($profile && $platform) { | |
$instance = hosting_package_instance_load(array( | |
'rid' => $platform, 'package_id' => $profile)); | |
- $languages = $instance->languages; | |
+ $languages = array_merge($languages, $instance->languages); | |
} | |
else { | |
$result = db_query("SELECT DISTINCT language FROM {hosting_package_languages}"); | |
@@ -134,7 +167,6 @@ function hosting_get_profile_languages($ | |
$languages[$lang->language] = _hosting_language_name($lang->language); | |
} | |
} | |
- $languages['en'] = _hosting_language_name('en'); | |
return $languages; | |
} | |
@@ -177,6 +209,15 @@ function hosting_get_packages_by_type($t | |
return false; | |
} | |
+function hosting_get_default_profile($default = null) { | |
+ if ($p = hosting_get_package('default')) { | |
+ return $p->nid; | |
+ } | |
+ elseif ($p = hosting_get_package('standard')) { | |
+ return $p->nid; | |
+ } | |
+ return $default; | |
+} | |
function hosting_get_package($short_name) { | |
$result = db_query("SELECT nid FROM {hosting_package} WHERE short_name = '%s'", $short_name); | |
@@ -309,22 +350,29 @@ function hosting_package_sync(&$data) { | |
foreach ($data as $plural => $packages) { | |
$type = _hosting_package_plural_map($plural); | |
foreach ($packages as $short_name => $file) { | |
- $name = ($file['name']) ? $file['name'] : $short_name; | |
+ $name = ($file['info']['name']) ? $file['info']['name'] : $short_name; | |
if (!($package = hosting_get_package($short_name))) { | |
// Create a new package. | |
$package = new stdClass(); | |
$package->type = 'package'; | |
$package->uid = 1; | |
- $package->title = $name; | |
$package->package_type = $type; | |
$package->short_name = $short_name; | |
$package->old_short_name = $file['info']['old_short_name']; | |
- $package->description = $file['description']; | |
$package->status = 1; | |
- node_save($package); | |
} | |
+ // we only call node save when the title, description changes | |
+ // or when it's a new package. | |
+ if (!$package->nid || | |
+ ($package->title != $name) || | |
+ ($package->description != $file['info']['description'])) { | |
+ $package->title = $name; | |
+ $package->description = $file['info']['description']; | |
+ | |
+ node_save($package); | |
+ } | |
$data[$plural][$short_name]['package_id'] = $package->nid; | |
} | |
} | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/platform/hosting_platform.module /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/platform/hosting_platform.module | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/platform/hosting_platform.module 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/platform/hosting_platform.module 2010-07-20 00:43:37.000000000 +0000 | |
@@ -301,6 +301,7 @@ function hosting_platform_load($node) { | |
$additions = db_fetch_object(db_query('SELECT publish_path, verified, web_server, status AS platform_status FROM {hosting_platform} WHERE vid = %d', $node->vid)); | |
$iid = db_result(db_query("SELECT iid FROM {hosting_package_instance} i left join {hosting_package} p on p.nid=i.package_id WHERE p.package_type='platform' AND i.rid=%d", $node->nid)); | |
$additions->release = hosting_package_instance_load($iid); | |
+ $additions->profiles = hosting_get_profiles($node->nid, 'short_name'); | |
return $additions; | |
} | |
@@ -326,9 +327,8 @@ function hosting_platform_node_load($arg | |
* Implementation of hook_view(). | |
*/ | |
function hosting_platform_view($node, $teaser = FALSE, $page = FALSE) { | |
- | |
- | |
modalframe_parent_js(); | |
+ | |
$node->content['info'] = array( | |
'#prefix' => '<div id="hosting-platform-info">', | |
'#suffix' => '</div>' | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/site/hosting_site.form.inc /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/site/hosting_site.form.inc | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/site/hosting_site.form.inc 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/site/hosting_site.form.inc 2010-07-20 00:43:37.000000000 +0000 | |
@@ -103,6 +103,7 @@ function hosting_site_available_options( | |
$return = array(); | |
$return['profile'] = array(); | |
+ $return['platform'] = array(); | |
$return['site_language'] = array(); | |
if (!hosting_feature('client')) { | |
@@ -112,32 +113,26 @@ function hosting_site_available_options( | |
$return['client'] = null; | |
} | |
- if (isset($node->platform)) { | |
- // Install profiles | |
- $profiles = hosting_get_profiles($node->platform); | |
- foreach($profiles as $id => $name) { | |
- // Don't allow a site to be provisioned with hostslave or hostmaster profile | |
- if (in_array($name, array('hostslave', 'hostmaster'))) { | |
- unset($profiles[$id]); | |
- } | |
+ // Install profiles | |
+ $profiles = hosting_get_profiles(); | |
+ foreach($profiles as $id => $name) { | |
+ // Don't allow a site to be provisioned with hostslave or hostmaster profile | |
+ if (in_array($name, array('Hostslave', 'Hostmaster'))) { | |
+ unset($profiles[$id]); | |
} | |
- reset($profiles); | |
- $return['profile'] = array_keys($profiles); | |
+ } | |
+ reset($profiles); | |
+ $return['profile'] = array_keys($profiles); | |
- if (sizeof($return['profile']) == 1) { | |
- $node->profile = $return['profile'][0]; | |
- } | |
- if (isset($node->profile) && in_array($node->profile, $return['profile'])) { | |
- $return['site_language'] = array_keys((array) hosting_get_profile_languages($node->profile, $node->platform)); | |
- } | |
+ if (!isset($node->profile)) { | |
+ $node->profile = hosting_get_default_profile($return['profile'][0]); | |
} | |
// filter the available platforms based on which clients the user has access to. | |
$user = user_load($GLOBALS['user']->uid); | |
$options = array(); | |
- $platforms = _hosting_get_platforms(); | |
- | |
+ $platforms = hosting_get_profile_platforms($node->profile); | |
if (sizeof($platforms)) { | |
foreach ($platforms as $nid => $title) { | |
$platform = node_load($nid); | |
@@ -152,6 +147,12 @@ function hosting_site_available_options( | |
$return['platform'] = $options; | |
} | |
+ if (!isset($node->platform) || !in_array($node->platform, $return['platform'])) { | |
+ $node->platform = $return['platform'][0]; | |
+ } | |
+ | |
+ $return['site_language'] = array_keys((array) hosting_get_profile_languages($node->profile, $node->platform)); | |
+ | |
drupal_alter('hosting_site_options', $return, $node); | |
return $return; | |
@@ -192,21 +193,11 @@ function hosting_site_form($node) { | |
'#autocomplete_path' => 'hosting_client/autocomplete/client', | |
), 'filter_xss', $editable); | |
- | |
- _hosting_site_field($form, $node, 'platform', array( | |
- '#type' => 'radios', | |
- '#title' => t('Platform'), | |
- '#required' => TRUE, | |
- '#description' => t('The platform you want the site to be hosted on.'), | |
- '#options' => _hosting_get_platforms(), | |
- '#default_value' => ($node->platform) ? $node->platform : HOSTING_DEFAULT_PLATFORM, | |
- ), '_hosting_node_link'); | |
- | |
// Install profiles | |
$profiles = hosting_get_profiles(); | |
foreach($profiles as $id => $name) { | |
// Don't allow a site to be provisioned with hostslave or hostmaster profile | |
- if (in_array($name, array('hostslave', 'hostmaster'))) { | |
+ if (in_array($name, array('Hostslave', 'Hostmaster'))) { | |
unset($profiles[$id]); | |
} | |
} | |
@@ -217,11 +208,22 @@ function hosting_site_form($node) { | |
'#title' => t('Install profile'), | |
'#description' => t('The type of site to install.'), | |
'#options' => $profiles, | |
- '#default_value' => $node->profile ? $node->profile : key($profiles), | |
+ '#default_value' => $node->profile ? $node->profile : hosting_get_default_profile(key($profiles)), | |
'#required' => TRUE, | |
'#attributes' => array('class' => "hosting-site-form-profile-options"), | |
), '_hosting_node_link'); | |
+ | |
+ | |
+ _hosting_site_field($form, $node, 'platform', array( | |
+ '#type' => 'radios', | |
+ '#title' => t('Platform'), | |
+ '#required' => TRUE, | |
+ '#description' => t('The platform you want the site to be hosted on.'), | |
+ '#options' => _hosting_get_platforms(), | |
+ '#default_value' => ($node->platform) ? $node->platform : HOSTING_DEFAULT_PLATFORM, | |
+ ), '_hosting_node_link'); | |
+ | |
_hosting_site_field($form, $node, 'site_language', array( | |
'#type' => 'radios', | |
'#title' => t('Language'), | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/site/hosting_site.nodeapi.inc /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/site/hosting_site.nodeapi.inc | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/site/hosting_site.nodeapi.inc 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/site/hosting_site.nodeapi.inc 2010-07-20 00:43:37.000000000 +0000 | |
@@ -131,12 +131,8 @@ function hosting_site_delete($node) { | |
/** | |
* Implementation of hook_nodeapi(). | |
*/ | |
-function hosting_site_nodeapi(&$node, $op, $teaser, $page) { | |
- switch($op) { | |
- case 'presave': | |
- $node->title = strtolower(trim($node->title)); // domain names are case-insensitive | |
- break; | |
- } | |
+function hosting_site_nodeapi_site_presave(&$node) { | |
+ $node->title = strtolower(trim($node->title)); // domain names are case-insensitive | |
} | |
/** | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/task/hosting_task.module /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/task/hosting_task.module | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/task/hosting_task.module 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/task/hosting_task.module 2010-07-20 00:43:37.000000000 +0000 | |
@@ -81,7 +81,7 @@ function hosting_task_menu_access($node, | |
if (!in_array($task, $safe_tasks)) { | |
// Don't show certain tasks if the site is the 'special' main aegir site | |
$profile = node_load($node->profile); | |
- if ($profile->title == 'hostmaster') { | |
+ if ($profile->short_name == 'hostmaster') { | |
return FALSE; | |
} | |
} | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_cluster/hosting_web_cluster.service.inc /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_cluster/hosting_web_cluster.service.inc | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_cluster/hosting_web_cluster.service.inc 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_cluster/hosting_web_cluster.service.inc 2010-07-20 00:43:37.000000000 +0000 | |
@@ -30,11 +30,17 @@ class hostingService_http_cluster extend | |
function load() { | |
parent::load(); | |
+ $ssl_enabled = TRUE; | |
+ | |
$web_servers = array(); | |
$result = db_query('SELECT web_server_nid FROM {hosting_web_cluster} WHERE vid = %d', $this->server->vid); | |
while ($web_server = db_fetch_object($result)) { | |
$web_servers[] = $web_server->web_server_nid; | |
+ $server = node_load($web_server->web_server_nid); | |
+ $ssl_enabled = $ssl_enabled && $server->services['http']->ssl_enabled; | |
} | |
+ | |
+ $this->ssl_enabled = $ssl_enabled; | |
$this->setValues(array('web_servers' => drupal_map_assoc($web_servers))); | |
} | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/nginx/hosting.feature.nginx.inc /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/nginx/hosting.feature.nginx.inc | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/nginx/hosting.feature.nginx.inc 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/nginx/hosting.feature.nginx.inc 2010-07-20 00:43:37.000000000 +0000 | |
@@ -6,6 +6,7 @@ function hosting_nginx_hosting_feature() | |
'description' => t('Provide support for the NGINX web server.'), | |
'status' => HOSTING_FEATURE_DISABLED, | |
'module' => 'hosting_nginx', | |
+ 'group' => 'experimental' | |
); | |
return $features; | |
} | |
Only in /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/nginx: ssl | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting.feature.ssl.inc /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting.feature.ssl.inc | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting.feature.ssl.inc 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting.feature.ssl.inc 2010-07-20 00:43:37.000000000 +0000 | |
@@ -6,6 +6,7 @@ function hosting_ssl_hosting_feature() { | |
'description' => t('Provides a service to expose a site encrypted by SSL certificates.'), | |
'status' => HOSTING_FEATURE_DISABLED, | |
'module' => 'hosting_ssl', | |
+ 'group' => 'experimental' | |
); | |
return $features; | |
} | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.module /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.module | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.module 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.module 2010-07-20 00:43:37.000000000 +0000 | |
@@ -28,6 +28,40 @@ function hosting_ssl_get_servers() { | |
return $ssl_servers; | |
} | |
+/** | |
+ * Return a list of platforms on SSL enabled servers. | |
+ */ | |
+function hosting_ssl_get_platforms() { | |
+ $servers = hosting_ssl_get_servers(); | |
+ $ssl_platforms = array(); | |
+ | |
+ $platforms = _hosting_get_platforms(); | |
+ foreach ($platforms as $nid => $title) { | |
+ $platform = node_load($nid); | |
+ if (in_array($platform->web_server, $servers)) { | |
+ $ssl_platforms[] = $nid; | |
+ } | |
+ } | |
+ | |
+ return $ssl_platforms; | |
+} | |
+ | |
+/** | |
+ * Return a list of profiles with SSL enabled platforms. | |
+ */ | |
+function hosting_ssl_get_profiles() { | |
+ $platforms = hosting_ssl_get_platforms(); | |
+ | |
+ $ssl_profiles = array(); | |
+ foreach ($platforms as $nid) { | |
+ $platform = node_load($nid); | |
+ $ssl_profiles = array_merge($ssl_profiles, array_keys($platform->profiles)); | |
+ } | |
+ | |
+ return array_unique($ssl_profiles); | |
+} | |
+ | |
+ | |
function hosting_ssl_form_alter(&$form, &$form_state, $form_id) { | |
if ($form_id == 'site_node_form') { | |
hosting_ssl_site_form($form, $form_state, $form_id); | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.nodeapi.inc 2010-07-20 00:43:37.000000000 +0000 | |
@@ -52,6 +52,7 @@ function hosting_ssl_hosting_site_option | |
// Test if ssl has been enabled. | |
if ($node->ssl_enabled != 0) { | |
+ | |
$keys = hosting_ssl_get_keys($node->client, TRUE); | |
// return the list of valid keys, including the special 'new key' option. | |
@@ -61,7 +62,6 @@ function hosting_ssl_hosting_site_option | |
if (sizeof($return['ssl_key']) == 1) { | |
$node->ssl_key = HOSTING_SSL_CUSTOM_KEY; | |
} | |
- | |
// the user has chosen to enter a new key | |
if ($node->ssl_key == HOSTING_SSL_CUSTOM_KEY) { | |
@@ -70,21 +70,11 @@ function hosting_ssl_hosting_site_option | |
$return['ssl_key_new'] = (!empty($default)) ? $default : true; | |
} | |
- // Only platforms that are SSL enabled can be chosen now. | |
- $ssl_servers = hosting_ssl_get_servers(); | |
- | |
- // check all existing valid platforms and remove the ones we don't want. | |
- foreach ($return['platform'] as $key => $nid) { | |
- $platform = node_load($nid); | |
- | |
- if (!in_array($platform->web_server, $ssl_servers)) { | |
- // Remove the platform from the list because SSL is not available for it. | |
- unset($return['platform'][$key]); | |
- } | |
- } | |
// we need to ensure that the return value is properly indexed, otherwise it | |
// gets interpreted as an object by jquery. | |
- $return['platform'] = array_values($return['platform']); | |
+ $return['profile'] = array_values(array_intersect($return['profile'], hosting_ssl_get_profiles())); | |
+ | |
+ $return['platform'] = array_values(array_intersect($return['platform'], hosting_ssl_get_platforms())); | |
} | |
} | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.service.inc /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.service.inc | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.service.inc 2010-07-18 14:04:04.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.service.inc 2010-07-20 00:43:37.000000000 +0000 | |
@@ -90,13 +90,3 @@ class hostingService_http_apache_ssl ext | |
} | |
-class hostingService_http_nginx_ssl extends hostingService_http_ssl { | |
- | |
- public $type = 'nginx_ssl'; | |
- protected $has_restart_cmd = TRUE; | |
- | |
- function default_restart_cmd() { | |
- return "sudo /etc/init.d/nginx reload"; | |
- } | |
- | |
-} | |
Only in /var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting: web_server.diff | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/sites/v185.barracuda.us.host8.biz/drushrc.php /var/aegir/hostmaster-HEAD/sites/v185.barracuda.us.host8.biz/drushrc.php | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/sites/v185.barracuda.us.host8.biz/drushrc.php 2010-07-18 14:30:03.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/sites/v185.barracuda.us.host8.biz/drushrc.php 2010-07-20 00:44:02.000000000 +0000 | |
@@ -4,10 +4,12 @@ | |
$options['db_type'] = 'mysqli'; | |
$options['db_host'] = 'v185.barracuda.us.host8.biz'; | |
$options['db_port'] = 3306; | |
-$options['db_passwd'] = '***'; | |
-$options['db_name'] = 'v185barracuda_20'; | |
-$options['db_user'] = 'v185barracuda_20'; | |
+$options['db_passwd'] = '***'; | |
+$options['db_name'] = 'v185barracuda_35'; | |
+$options['db_user'] = 'v185barracuda_35'; | |
$options['installed'] = true; | |
+$options['site_ip_addresses'] = array ( | |
+); | |
$options['packages'] = array ( | |
'platforms' => | |
array ( | |
@@ -689,6 +691,34 @@ $options['packages'] = array ( | |
'project' => 'drupal', | |
'version' => '6.17', | |
), | |
+ 'update' => | |
+ array ( | |
+ 'filename' => '/var/aegir/hostmaster-HEAD/modules/update/update.module', | |
+ 'name' => 'update', | |
+ 'type' => 'module', | |
+ 'owner' => '', | |
+ 'status' => '0', | |
+ 'throttle' => '0', | |
+ 'bootstrap' => '0', | |
+ 'schema_version' => 0, | |
+ 'weight' => '0', | |
+ 'info' => | |
+ array ( | |
+ 'name' => 'Update status', | |
+ 'description' => 'Checks the status of available updates for Drupal and your installed modules and themes.', | |
+ 'version' => '6.17', | |
+ 'package' => 'Core - optional', | |
+ 'core' => '6.x', | |
+ 'project' => 'drupal', | |
+ 'datestamp' => '1275505216', | |
+ 'dependencies' => | |
+ array ( | |
+ ), | |
+ 'php' => '4.3.5', | |
+ ), | |
+ 'project' => 'drupal', | |
+ 'version' => '6.17', | |
+ ), | |
'upload' => | |
array ( | |
'filename' => '/var/aegir/hostmaster-HEAD/modules/upload/upload.module', | |
@@ -1160,34 +1190,6 @@ $options['packages'] = array ( | |
'project' => 'drupal', | |
'version' => '6.17', | |
), | |
- 'update' => | |
- array ( | |
- 'filename' => '/var/aegir/hostmaster-HEAD/modules/update/update.module', | |
- 'name' => 'update', | |
- 'type' => 'module', | |
- 'owner' => '', | |
- 'status' => '1', | |
- 'throttle' => '0', | |
- 'bootstrap' => '0', | |
- 'schema_version' => '6000', | |
- 'weight' => '0', | |
- 'info' => | |
- array ( | |
- 'name' => 'Update status', | |
- 'description' => 'Checks the status of available updates for Drupal and your installed modules and themes.', | |
- 'version' => '6.17', | |
- 'package' => 'Core - optional', | |
- 'core' => '6.x', | |
- 'project' => 'drupal', | |
- 'datestamp' => '1275505216', | |
- 'dependencies' => | |
- array ( | |
- ), | |
- 'php' => '4.3.5', | |
- ), | |
- 'project' => 'drupal', | |
- 'version' => '6.17', | |
- ), | |
'user' => | |
array ( | |
'filename' => '/var/aegir/hostmaster-HEAD/modules/user/user.module', | |
@@ -1488,6 +1490,35 @@ $options['packages'] = array ( | |
'project' => '', | |
'version' => NULL, | |
), | |
+ 'hosting_nginx_ssl' => | |
+ array ( | |
+ 'filename' => '/var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/nginx/ssl/hosting_nginx_ssl.module', | |
+ 'name' => 'hosting_nginx_ssl', | |
+ 'type' => 'module', | |
+ 'owner' => '', | |
+ 'status' => '1', | |
+ 'throttle' => '0', | |
+ 'bootstrap' => '0', | |
+ 'schema_version' => '0', | |
+ 'weight' => '0', | |
+ 'info' => | |
+ array ( | |
+ 'name' => 'Nginx +SSL servers', | |
+ 'description' => 'Allow hostmaster to configure NGINX web servers with SSL support.', | |
+ 'package' => 'Hosting', | |
+ 'dependencies' => | |
+ array ( | |
+ 0 => 'hosting_web_server', | |
+ 1 => 'hosting_ssl', | |
+ 2 => 'hosting_nginx', | |
+ ), | |
+ 'core' => '6.x', | |
+ 'version' => NULL, | |
+ 'php' => '4.3.5', | |
+ ), | |
+ 'project' => '', | |
+ 'version' => NULL, | |
+ ), | |
'hosting_ssl' => | |
array ( | |
'filename' => '/var/aegir/hostmaster-HEAD/profiles/hostmaster/modules/hosting/web_server/ssl/hosting_ssl.module', | |
@@ -1640,46 +1671,6 @@ $options['packages'] = array ( | |
), | |
'themes' => | |
array ( | |
- 'eldir' => | |
- array ( | |
- 'filename' => '/var/aegir/hostmaster-HEAD/profiles/hostmaster/themes/eldir/eldir.info', | |
- 'name' => 'eldir', | |
- 'type' => 'theme', | |
- 'owner' => 'themes/engines/phptemplate/phptemplate.engine', | |
- 'status' => '0', | |
- 'throttle' => '0', | |
- 'bootstrap' => '0', | |
- 'schema_version' => 0, | |
- 'weight' => '0', | |
- 'info' => | |
- array ( | |
- 'name' => 'Eldir', | |
- 'description' => 'Companion theme for the Aegir hosting system.', | |
- 'version' => '6.17', | |
- 'core' => '6.x', | |
- 'engine' => 'phptemplate', | |
- 'stylesheets' => | |
- array ( | |
- 'all' => | |
- array ( | |
- 0 => 'style.css', | |
- ), | |
- ), | |
- 'regions' => | |
- array ( | |
- 'left' => 'Left sidebar', | |
- 'right' => 'Right sidebar', | |
- 'content' => 'Content', | |
- 'header' => 'Header', | |
- ), | |
- 'dependencies' => | |
- array ( | |
- ), | |
- 'php' => '4.3.5', | |
- ), | |
- 'project' => '', | |
- 'version' => '6.17', | |
- ), | |
'bluemarine' => | |
array ( | |
'filename' => '/var/aegir/hostmaster-HEAD/themes/bluemarine/bluemarine.info', | |
@@ -1755,12 +1746,12 @@ $options['packages'] = array ( | |
'project' => 'drupal', | |
'version' => '6.17', | |
), | |
- 'marvin' => | |
+ 'eldir' => | |
array ( | |
- 'filename' => '/var/aegir/hostmaster-HEAD/themes/chameleon/marvin/marvin.info', | |
- 'name' => 'marvin', | |
+ 'filename' => '/var/aegir/hostmaster-HEAD/profiles/hostmaster/themes/eldir/eldir.info', | |
+ 'name' => 'eldir', | |
'type' => 'theme', | |
- 'owner' => '', | |
+ 'owner' => 'themes/engines/phptemplate/phptemplate.engine', | |
'status' => '0', | |
'throttle' => '0', | |
'bootstrap' => '0', | |
@@ -1768,24 +1759,31 @@ $options['packages'] = array ( | |
'weight' => '0', | |
'info' => | |
array ( | |
- 'name' => 'Marvin', | |
- 'description' => 'Boxy tabled theme in all grays.', | |
+ 'name' => 'Eldir', | |
+ 'description' => 'Companion theme for the Aegir hosting system.', | |
+ 'version' => '6.17', | |
+ 'core' => '6.x', | |
+ 'engine' => 'phptemplate', | |
+ 'stylesheets' => | |
+ array ( | |
+ 'all' => | |
+ array ( | |
+ 0 => 'style.css', | |
+ ), | |
+ ), | |
'regions' => | |
array ( | |
'left' => 'Left sidebar', | |
'right' => 'Right sidebar', | |
+ 'content' => 'Content', | |
+ 'header' => 'Header', | |
), | |
- 'version' => '6.17', | |
- 'core' => '6.x', | |
- 'base theme' => 'chameleon', | |
- 'project' => 'drupal', | |
- 'datestamp' => '1275505216', | |
'dependencies' => | |
array ( | |
), | |
'php' => '4.3.5', | |
), | |
- 'project' => 'drupal', | |
+ 'project' => '', | |
'version' => '6.17', | |
), | |
'garland' => | |
@@ -1827,6 +1825,39 @@ $options['packages'] = array ( | |
'project' => 'drupal', | |
'version' => '6.17', | |
), | |
+ 'marvin' => | |
+ array ( | |
+ 'filename' => '/var/aegir/hostmaster-HEAD/themes/chameleon/marvin/marvin.info', | |
+ 'name' => 'marvin', | |
+ 'type' => 'theme', | |
+ 'owner' => '', | |
+ 'status' => '0', | |
+ 'throttle' => '0', | |
+ 'bootstrap' => '0', | |
+ 'schema_version' => 0, | |
+ 'weight' => '0', | |
+ 'info' => | |
+ array ( | |
+ 'name' => 'Marvin', | |
+ 'description' => 'Boxy tabled theme in all grays.', | |
+ 'regions' => | |
+ array ( | |
+ 'left' => 'Left sidebar', | |
+ 'right' => 'Right sidebar', | |
+ ), | |
+ 'version' => '6.17', | |
+ 'core' => '6.x', | |
+ 'base theme' => 'chameleon', | |
+ 'project' => 'drupal', | |
+ 'datestamp' => '1275505216', | |
+ 'dependencies' => | |
+ array ( | |
+ ), | |
+ 'php' => '4.3.5', | |
+ ), | |
+ 'project' => 'drupal', | |
+ 'version' => '6.17', | |
+ ), | |
'minnelli' => | |
array ( | |
'filename' => '/var/aegir/hostmaster-HEAD/themes/garland/minnelli/minnelli.info', | |
diff -urp /var/backups/8/2/aegir/hostmaster-HEAD/sites/v185.barracuda.us.host8.biz/settings.php /var/aegir/hostmaster-HEAD/sites/v185.barracuda.us.host8.biz/settings.php | |
--- /var/backups/8/2/aegir/hostmaster-HEAD/sites/v185.barracuda.us.host8.biz/settings.php 2010-07-18 14:30:02.000000000 +0000 | |
+++ /var/aegir/hostmaster-HEAD/sites/v185.barracuda.us.host8.biz/settings.php 2010-07-20 00:44:02.000000000 +0000 | |
@@ -9,12 +9,12 @@ | |
*/ | |
$databases['default']['default'] = array( | |
'driver' => "mysqli", | |
- 'database' => "v185barracuda_20", | |
- 'username' => "v185barracuda_20", | |
- 'password' => "***", | |
+ 'database' => "v185barracuda_35", | |
+ 'username' => "v185barracuda_35", | |
+ 'password' => "***", | |
'host' => v185.barracuda.us.host8.biz, | |
); | |
- $db_url = "mysqli://v185barracuda_20:***@v185.barracuda.us.host8.biz/v185barracuda_20"; | |
+ $db_url = "mysqli://v185barracuda_35:***@v185.barracuda.us.host8.biz/v185barracuda_35"; | |
$profile = "hostmaster"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment