Incorrect dblog entry when using an email widget field

jajathejazzcat - August 12, 2009 - 12:31
Project:Field Actions
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

The function fieldactions_send_email_to_email_action creates a dblog entry of 'Sent email to %node_owner_mail', when it should be the email address entered into an email widget field.

So in line 523,

<?php
     
if (drupal_mail('fieldactions_general', 'fieldactions_mail_to_email', $field_value['email'], $language, $params, $from, TRUE)) {
       
watchdog('fieldactions', 'Sent email to %recipient', array('%recipient' => $vars['%node_owner_mail']));
      }
      else {
       
watchdog('error', 'Unable to send email to %recipient', array('%recipient' => $vars['%node_owner_mail']));
      }
?>

should be changed to

<?php
     
if (drupal_mail('fieldactions_general', 'fieldactions_mail_to_email', $field_value['email'], $language, $params, $from, TRUE)) {
       
watchdog('fieldactions', 'Sent email to %recipient', array('%recipient' => $field_value['email']));
      }
      else {
       
watchdog('error', 'Unable to send email to %recipient', array('%recipient' => $field_value['email']));
      }
?>

#1

jajathejazzcat - August 12, 2009 - 12:54

Here is a patch.

AttachmentSize
fieldactions-547062-1.patch 828 bytes

#2

deekayen - August 12, 2009 - 14:44
Status:active» fixed

committed to HEAD and DRUPAL-6--1

#3

System Message - August 26, 2009 - 14:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.