Create a helper function in farm.install for enabling modules.

This commit is contained in:
Michael Stenta 2015-08-07 13:55:38 -04:00
parent 6e354a6bde
commit 54daf2f860
1 changed files with 7 additions and 0 deletions

View File

@ -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));