function og_requirements in Organic groups 5
Same name and namespace in other branches
- 5.8 og.module \og_requirements()
- 5.3 og.module \og_requirements()
- 5.7 og.module \og_requirements()
- 6.2 og.install \og_requirements()
- 6 og.install \og_requirements()
File
- ./
og.module, line 2971
Code
function og_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time
$t = get_t();
if ($phase == 'runtime') {
$og_types = og_get_types('group');
$all_types = array_keys(node_get_types('types'));
if (!count(array_intersect($og_types, $all_types))) {
$requirements['og_group_types'] = array(
'title' => $t('Organic groups group type'),
'value' => $t('You have no node types which are acting as groups. See the Notes section of the !readme and the Content types fieldset at top of <a href="!settings">OG settings</a>.', array(
'!readme' => og_readme(),
'!settings' => url('admin/og/og'),
)),
'severity' => REQUIREMENT_ERROR,
);
}
if (!module_exists('job_queue')) {
$requirements['og_modules'] = array(
'title' => $t('Organic groups modules'),
'value' => $t('Organic groups works best when !job_queue.module is enabled. See the Integration section of the !readme.', array(
'!job_queue' => l('job_queue.module', 'http://drupal.org/project/job_queue'),
'!readme' => og_readme(),
)),
'severity' => REQUIREMENT_INFO,
);
}
if (!module_exists('og_access')) {
$requirements['og_access'] = array(
'title' => $t('Organic groups access control'),
'value' => $t('Organic groups access control module is disabled. See the !modules', array(
'!modules' => l($t('modules page'), 'admin/build/modules'),
)),
'severity' => REQUIREMENT_INFO,
);
}
}
return $requirements;
}