function mailhandler_requirements in Mailhandler 5
Same name and namespace in other branches
- 6.2 mailhandler.install \mailhandler_requirements()
- 6 mailhandler.install \mailhandler_requirements()
- 7.2 mailhandler.install \mailhandler_requirements()
- 7 mailhandler.install \mailhandler_requirements()
Check that the IMAP extension exists for PHP.
File
- ./
mailhandler.install, line 74
Code
function mailhandler_requirements($phase) {
// Ensure translations don't break at install time
$t = get_t();
$has_imap = function_exists('imap_open');
$requirements['mailhandler'] = array(
'title' => $t('IMAP'),
'description' => $t("Mailhandler requires that PHP's !ext is enabled in order to function properly.", array(
'!ext' => l('IMAP extension', 'http://www.php.net/imap'),
)),
'value' => $has_imap ? $t('Enabled') : $t('Not found'),
'severity' => $has_imap ? REQUIREMENT_OK : REQUIREMENT_ERROR,
);
return $requirements;
}