update_mail

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/update/update.module, строка 404

Версии
6
update_mail($key, &$message, $params)

Implementation of hook_mail().

Constructs the email notification message when the site is out of date.

Смотрите также

drupal_mail()

@see _update_cron_notify()

See also

_update_message_text()

Параметры

$key Unique key to indicate what message to build, always 'status_notify'.

$message Reference to the message array being built.

$params Array of parameters to indicate what kind of text to include in the message body. This is a keyed array of message type ('core' or 'contrib') as the keys, and the status reason constant (UPDATE_NOT_SECURE, etc) for the values.

Код

<?php
function update_mail($key, &$message, $params) {
  $language = $message['language'];
  $langcode = $language->language;
  $message['subject'] .= t('New release(s) available for !site_name', array('!site_name' => variable_get('site_name', 'Drupal')), $langcode);
  foreach ($params as $msg_type => $msg_reason) {
    $message['body'][] = _update_message_text($msg_type, $msg_reason, FALSE, $language);
  }
  $message['body'][] = t('See the available updates page for more information:', array(), $langcode) ."\n". url('admin/reports/updates', array('absolute' => TRUE, 'language' => $language));
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему