Commit 82eead92 authored by ergonlogic's avatar ergonlogic

Issue #2102341: Differentiate between a feature being disabled vs absent.

parent bb24fc80
......@@ -18,12 +18,10 @@ class Provision_Config_Drushrc_Aegir extends Provision_Config_Drushrc {
}
function load_data() {
// List enabled Hosting Features.
// List Hosting Features and their enabled status.
$features = hosting_get_features();
foreach ($features as $name => $info) {
if ($info['enabled'] == 1) {
$enabled_features[] = $name;
}
$enabled_features[$name] = $info['enabled'];
}
$this->data['hosting_features'] = $enabled_features;
......
......@@ -3,8 +3,9 @@
/**
* Implements hook_drush_load().
*
* Checks if the corresponsing Hosting Feature is enabled.
* Checks if the corresponsing Hosting Feature is installed and enabled.
*/
function dns_drush_load() {
return in_array('dns', drush_get_option('hosting_features', array()));
$features = drush_get_option('hosting_features', array());
return array_key_exists('dns', $features) && $features['dns'];
}
......@@ -3,8 +3,9 @@
/**
* Implements hook_drush_load().
*
* Checks if the corresponsing Hosting Feature is enabled.
* Checks if the corresponsing Hosting Feature is installed and enabled.
*/
function subdirs_drush_load() {
return in_array('subdirs', drush_get_option('hosting_features', array()));
$features = drush_get_option('hosting_features', array());
return array_key_exists('subdirs', $features) && $features['subdirs'];
}
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