You are here

public function SiteAuditCheckViewsEnabled::calculateScore in Site Audit 7

Same name and namespace in other branches
  1. 8.2 Check/Views/Enabled.php \SiteAuditCheckViewsEnabled::calculateScore()

Implements \SiteAudit\Check\Abstract\calculateScore().

Overrides SiteAuditCheckAbstract::calculateScore

File

Check/Views/Enabled.php, line 60
Contains \SiteAudit\Check\Views\Enabled.

Class

SiteAuditCheckViewsEnabled
Class SiteAuditCheckViewsEnabled.

Code

public function calculateScore() {
  if (!module_exists('views')) {
    $this->abort = TRUE;
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;
  }
  $info = drupal_parse_info_file(drupal_get_path('module', 'views') . '/views.info');
  if (version_compare($info['version'], '7.x-3.0') >= 0) {
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
  }
  return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
}