Commit 9647c109 authored by metzlerd's avatar metzlerd
Browse files

Fixed bug in passing subject through

also fixed bug in getting correct body from prompt. 
parent fb91fd14
......@@ -15,10 +15,9 @@ class FrxEmailMergeDoc extends FrxDocument {
libxml_clear_errors();
$xml = simplexml_import_dom($doc);
$docs = $xml->xpath('.//*[@class="email-document"]');
if (!$docs)
$prompt_subject = TRUE;
$prompt_body = TRUE;
foreach ($docs as $doc) {
if ($docs) foreach ($docs as $doc) {
$from = $doc->xpath('.//*[@class="email-header-from"]');
$from = $from ? (string)$from[0] : '';
$subject = $doc->xpath('.//*[@class="email-header-subject"]');
......
......@@ -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);
$max = (integer)$form_state['values']['max'];
$i = 0;
if (isset($form_state['values']['body'])) {
$body = check_markup($form_state['values']['body'], variable_get('forena_input_format', filter_default_format()));
if (isset($form_state['values']['body']['value'])) {
$body = check_markup($form_state['values']['body']['value'], variable_get('forena_input_format', filter_default_format()));
}
foreach ($form_state['storage']['docs'] as $doc) {
$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