Commit 3ed86b36 authored by ergonlogic's avatar ergonlogic

Simplify enabled features array.

parent 32515ac3
......@@ -22,14 +22,11 @@ class Provision_Config_Drushrc_Aegir extends Provision_Config_Drushrc {
$features = hosting_get_features();
foreach ($features as $name => $info) {
if ($info['enabled'] == 1) {
$features[$name] = $name;
}
else {
unset($features[$name]);
$enabled_features[] = $name;
}
}
$this->data['hosting_features'] = $features;
$this->data['hosting_features'] = $enabled_features;
}
}
......@@ -6,5 +6,5 @@
* Checks if the corresponsing Hosting Feature is enabled.
*/
function subdirs_drush_load() {
return array_search('subdirs', drush_get_option('hosting_features', array()));
return in_array('subdirs', drush_get_option('hosting_features', array()));
}
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