function constant_contact_requirements in Constant Contact 6.3
Same name and namespace in other branches
- 6.2 constant_contact.install \constant_contact_requirements()
- 7.3 constant_contact.install \constant_contact_requirements()
Implementation of hook_requirements(). This helps admin know if the module is functioning correctly.
File
- ./
constant_contact.install, line 13
Code
function constant_contact_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
// running the module...
}
else {
// installing...
if (!extension_loaded('xml')) {
$requirements['constant_contact']['xml'] = array(
'value' => t('XML extension Not installed'),
'severity' => REQUIREMENT_ERROR,
'description' => t('The XML extension for PHP is missing or outdated. Please check the PHP XML documentation for information on how to correct this.'),
);
$requirements['constant_contact']['xml']['title'] = t('Constant Contact');
}
if (!extension_loaded('curl')) {
$requirements['constant_contact']['curl'] = array(
'value' => t('curl extension Not installed'),
'severity' => REQUIREMENT_ERROR,
'description' => t('The curl extension for PHP is missing or outdated. Please check the PHP curl documentation at www.php.net/curl for information on how to correct this.'),
);
$requirements['constant_contact']['curl']['title'] = t('Constant Contact');
}
}
return $requirements;
}