function flag_requirements in Flag 5
Same name and namespace in other branches
- 8.4 flag.install \flag_requirements()
- 6.2 flag.install \flag_requirements()
- 6 flag.install \flag_requirements()
- 7.3 flag.install \flag_requirements()
- 7.2 flag.install \flag_requirements()
Implementation of hook_requirements().
Prevent installing this module if the "Flag content" module is installed as well.
File
- ./
flag.install, line 186 - Flag module install/update hooks.
Code
function flag_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'install') {
if (!defined('MAINTENANCE_MODE') && _flag_flag_content_installed()) {
$requirements['flag_content_clash']['title'] = $t('Flag');
$requirements['flag_content_clash']['severity'] = REQUIREMENT_ERROR;
$requirements['flag_content_clash']['description'] = _flag_flag_content_message();
}
}
return $requirements;
}