Commit 48561540 authored by metzlerd's avatar metzlerd
Browse files

Merge branch '7.x-3.x' of metzlerd@git.drupal.org:project/forena.git into 7.x-3.x

parents 2a3d97cb a2265066
...@@ -15,10 +15,9 @@ class FrxEmailMergeDoc extends FrxDocument { ...@@ -15,10 +15,9 @@ class FrxEmailMergeDoc extends FrxDocument {
libxml_clear_errors(); libxml_clear_errors();
$xml = simplexml_import_dom($doc); $xml = simplexml_import_dom($doc);
$docs = $xml->xpath('.//*[@class="email-document"]'); $docs = $xml->xpath('.//*[@class="email-document"]');
if (!$docs)
$prompt_subject = TRUE; $prompt_subject = TRUE;
$prompt_body = TRUE; $prompt_body = TRUE;
foreach ($docs as $doc) { if ($docs) foreach ($docs as $doc) {
$from = $doc->xpath('.//*[@class="email-header-from"]'); $from = $doc->xpath('.//*[@class="email-header-from"]');
$from = $from ? (string)$from[0] : ''; $from = $from ? (string)$from[0] : '';
$subject = $doc->xpath('.//*[@class="email-header-subject"]'); $subject = $doc->xpath('.//*[@class="email-header-subject"]');
......
...@@ -252,8 +252,8 @@ function forena_confirm_email_submit($form, &$form_state) { ...@@ -252,8 +252,8 @@ function forena_confirm_email_submit($form, &$form_state) {
$test_send = @$form_state['values']['send']=='test' ? TRUE : variable_get('forena_email_override', FALSE); $test_send = @$form_state['values']['send']=='test' ? TRUE : variable_get('forena_email_override', FALSE);
$max = (integer)$form_state['values']['max']; $max = (integer)$form_state['values']['max'];
$i = 0; $i = 0;
if (isset($form_state['values']['body'])) { if (isset($form_state['values']['body']['value'])) {
$body = check_markup($form_state['values']['body'], variable_get('forena_input_format', filter_default_format())); $body = check_markup($form_state['values']['body']['value'],$form_state['values']['body']['format']);
} }
foreach ($form_state['storage']['docs'] as $doc) { foreach ($form_state['storage']['docs'] as $doc) {
$to = $test_send ? $user->mail : $doc['to']; $to = $test_send ? $user->mail : $doc['to'];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment