function git_deploy_requirements in Git Deploy 6.2
Same name and namespace in other branches
- 8.2 git_deploy.install \git_deploy_requirements()
- 6 git_deploy.install \git_deploy_requirements()
- 7.2 git_deploy.install \git_deploy_requirements()
- 7 git_deploy.install \git_deploy_requirements()
Implements hook_requirements().
File
- ./
git_deploy.install, line 11 - Checks that site can get version information with Git.
Code
function git_deploy_requirements($phase) {
if ($phase == 'runtime' && module_exists('update') && !module_exists('mydropwizard')) {
$requirements['git_deploy_update'] = array(
'title' => t('Unsupported <em>Update status</em> module is installed.'),
'value' => t('Conflict'),
'severity' => REQUIREMENT_ERROR,
'description' => t('Drupal 6 has reached its community End-of-Life (EOL) date and is now in a Long-Term Support (LTS) phase, where support is provided by a <a href="http://drupal.org/project/d6lts">small group of vendors</a>. To get accurate update status information, enable the <a href="https://www.drupal.org/project/mydropwizard">myDropWizard</a> module.'),
);
}
$message = t('Available');
$severity = REQUIREMENT_OK;
$description = '';
if (!function_exists('exec')) {
$message = t('Disabled exec()');
$description = t('The exec() PHP function is disabled. Git deploy is unable to work without that.');
$severity = REQUIREMENT_ERROR;
}
elseif (!exec('git')) {
$message = t('Git not found');
$description = t('The git binary is not executable from PHP. Git deploy is unable to work without that.');
$severity = REQUIREMENT_ERROR;
}
$requirements['git_deploy_git'] = array(
'title' => t('Executable git binary'),
'value' => $message,
'severity' => $severity,
'description' => $description,
);
return $requirements;
}