You are here

function subscriptions_mail_requirements in Subscriptions 7

Same name and namespace in other branches
  1. 2.0.x subscriptions_mail/subscriptions_mail.install \subscriptions_mail_requirements()

File

./subscriptions_mail.install, line 56
Subscriptions Mail module installation.

Code

function subscriptions_mail_requirements($phase) {
  $requirements = array();
  if ($phase == 'update') {
    $t = get_t();
    if (!module_exists('mail_edit')) {
      $requirements[] = array(
        'title' => $t('Mail Editor'),
        'value' => $t('Missing'),
        'description' => $t('@Subscriptions_Mail requires the !Mail_Editor module to be installed.', array(
          '@Subscriptions_Mail' => 'Subscriptions Mail',
          '!Mail_Editor' => l('Mail Editor', 'http://drupal.org/project/mail_edit', array(
            'external' => TRUE,
          )),
        )),
        'severity' => REQUIREMENT_ERROR,
      );
    }
    if (!module_exists('token')) {
      $requirements[] = array(
        'title' => $t('Token'),
        'value' => $t('Missing'),
        'description' => $t('@Subscriptions_Mail requires the !Token module to be installed.', array(
          '@Subscriptions_Mail' => 'Subscriptions Mail',
          '!Token' => l('Token', 'http://drupal.org/project/token', array(
            'external' => TRUE,
          )),
        )),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}