function site_audit_version_check in Site Audit 7
Same name and namespace in other branches
- 8.2 site_audit.drush.inc \site_audit_version_check()
Check the Drupal major version.
Return value
bool FALSE if unsupported.
16 calls to site_audit_version_check()
- drush_site_audit_audit_all_validate in ./
site_audit.drush.inc - Validate execution of all reports.
- drush_site_audit_audit_best_practices_validate in ./
site_audit.drush.inc - Audit best practices validation.
- drush_site_audit_audit_block_validate in ./
site_audit.drush.inc - Audit Block validation.
- drush_site_audit_audit_cache_validate in ./
site_audit.drush.inc - Audit cache validation.
- drush_site_audit_audit_codebase_validate in ./
site_audit.drush.inc - Audit codebase validation.
File
- ./
site_audit.drush.inc, line 521 - Drupal site auditing commands.
Code
function site_audit_version_check() {
$drupal_major_version = drush_drupal_major_version();
if ($drupal_major_version < 7 || $drupal_major_version >= 8) {
return drush_set_error('SITE_AUDIT_DRUPAL_7_ONLY', dt('This version of Site Audit only supports Drupal 7.'));
}
return TRUE;
}