Create a helper function in farm.install for enabling modules.
This commit is contained in:
parent
6e354a6bde
commit
54daf2f860
|
@ -61,6 +61,13 @@ function farm_update_7001(&$sandbox) {
|
|||
'openlayers_geofield',
|
||||
'views_geojson',
|
||||
);
|
||||
_farm_enable_modules($modules);
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function: enable modules.
|
||||
*/
|
||||
function _farm_enable_modules($modules = array()) {
|
||||
foreach ($modules as $module) {
|
||||
if (!module_exists($module)) {
|
||||
module_enable(array($module));
|
||||
|
|
Loading…
Reference in New Issue