hook_mail_alter() missing components in doc

sja1 - October 3, 2009 - 17:30
Project:Drupal
Version:6.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Issue tags:Novice
Description

The documentation appears to leave out 2 keys in the $message array: 'params' and 'language'.

The following is an excerpt from the drupal_mail function, showing that these two variables are included in the array passed to hook_mail_alter.

// Bundle up the variables into a structured array for altering.
  $message = array(
    'id'       => $module .'_'. $key,
    'to'       => $to,
    'from'     => isset($from) ? $from : $default_from,
    'language' => $language,
    'params'   => $params,
    'subject'  => '',
    'body'     => array()
  );

#1

jhodgdon - October 5, 2009 - 22:29

The Drupal 7 doc for hook_mail_alter has these two components: http://api.drupal.org/api/function/hook_mail_alter/7

Drupal 6 version leaves them out, and sja1 is correct that they are in http://api.drupal.org/api/function/drupal_mail/6 and should be documented in hook_mail_alter().

#2

jhodgdon - October 5, 2009 - 22:29
Title:Documentation problem with hook_mail_alter» hook_mail_alter() missing components in doc

#3

jhodgdon - October 8, 2009 - 19:01
Status:active» fixed

I fixed this for Drupal 6 (it's in the contrib repository). Just copied the relevant lines from Drupal 7 doc.
http://drupal.org/cvs?commit=272426

#4

System Message - October 22, 2009 - 19:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.