mailhandler_php_imap.install in Mailhandler 7.2
Same filename and directory in other branches
Install, update and uninstall functions for the Mailhandler module.
File
modules/mailhandler_php_imap/mailhandler_php_imap.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the Mailhandler module.
*/
/**
* Implements hook_requirements().
*
* Check that the IMAP extension exists for PHP.
*/
function mailhandler_php_imap_requirements($phase) {
// Ensure translations don't break at install time.
$t = get_t();
$has_imap = function_exists('imap_open');
$requirements['mailhandler_php_imap'] = array(
'title' => $t('Mailhandler PHP IMAP'),
'description' => $t("Mailhandler PHP IMAP 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;
}
Functions
Name | Description |
---|---|
mailhandler_php_imap_requirements | Implements hook_requirements(). |