You are here

function event_requirements in Event 5.2

We need mysql >= 4.1.1

File

./event.install, line 6

Code

function event_requirements($phase) {

  // Ensure translations don't break at install time
  $t = get_t();
  global $db_type;
  if ($db_type == 'mysql' || $db_type == 'mysqli') {
    $version = db_version();
    $requirements['mysql_event'] = array(
      'title' => $t('MySQL database for event module'),
      'value' => $phase == 'runtime' ? l($version, 'admin/logs/status/sql') : $version,
    );
    if (version_compare($version, '4.1.1') < 0) {
      $requirements['mysql_event']['severity'] = REQUIREMENT_ERROR;
      $requirements['mysql_event']['description'] = $t('Your MySQL Server is too old. Event module 5.2 requires at least MySQL %version. The 5.1 version is compatible with MySQL 3.', array(
        '%version' => '4.1.1',
      ));
    }
  }
  return $requirements;
}