In our hosting-features registry, we cannot currently differentiate between a module being disabled, and a module being absent. If we instead used the feature name for the key, and the value was a simple toggle, we'd be able to do:

$features = drush_get_option('hosting_features', array());
if (array_key_exists('this_feature', $features)) {
return $features['this_feature'];
}
else {
// react to missing feature...
}

Alternatively, if the value for an enabled feature was set to the feature name (instead of '1' or TRUE), our current in_array()'s would still work too.

Comments

ergonlogic’s picture

I'm convinced that we need to be able to differentiate between something being 'off' in the front-end vs. 'absent'. only 'off' should stop the loading of commandfiles, otherwise our back-end has a dependency on the front-end.

ergonlogic’s picture

Status: Active » Fixed

Fixed in 82eead9.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.