Closed (fixed)
Project:
Hostmaster (Aegir)
Version:
6.x-2.x-dev
Component:
API
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2013 at 18:35 UTC
Updated:
21 Oct 2013 at 17:00 UTC
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
Comment #1
ergonlogicI'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.
Comment #2
ergonlogicFixed in 82eead9.