function mimemail_compress_requirements in Mime Mail 7
Same name and namespace in other branches
- 6 modules/mimemail_compress/mimemail_compress.install \mimemail_compress_requirements()
Implements hook_requirements().
File
- modules/
mimemail_compress/ mimemail_compress.install, line 11 - Install, update and uninstall functions for Mime Mail Compress module.
Code
function mimemail_compress_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time.
$t = get_t();
// Test PHP DOM extension.
if (extension_loaded('dom')) {
$requirements['dom']['value'] = $t('Enabled');
}
else {
$requirements['dom'] = array(
'description' => $t('Mime Mail Compress requires the PHP DOM extension to be enabled.'),
'severity' => REQUIREMENT_ERROR,
'value' => $t('Disabled'),
);
}
$requirements['dom']['title'] = $t('PHP DOM extension');
return $requirements;
}