Skip to content

Commit

Permalink
Merge pull request #229 from tobenschmidt/develop
Browse files Browse the repository at this point in the history
[TASK] Improve inclusion of media + [BUGFIX] Fix setting of textarea width
  • Loading branch information
kartolo authored Dec 22, 2020
2 parents ff991cc + 43f5ad6 commit ae434de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion Classes/Dmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,11 @@ public function setContent(&$mailer)
foreach ($this->theParts['html']['media'] as $media) {
// TODO: why are there table related tags here?
if (($media['tag'] === 'img' || $media['tag'] === 'table' || $media['tag'] === 'tr' || $media['tag'] === 'td') && !$media['use_jumpurl'] && !$media['do_not_embed']) {
$mailer->embed(GeneralUtility::getUrl($media['absRef']), basename($media['absRef']));
if (ini_get('allow_url_fopen')) {
$mailer->embed(fopen($media['absRef'], 'r'), basename($media['absRef']));
} else {
$mailer->embed(GeneralUtility::getUrl($media['absRef']), basename($media['absRef']));
}
$this->theParts['html']['content'] = str_replace($media['subst_str'], 'cid:' . basename($media['absRef']), $this->theParts['html']['content']);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ public function cmd_displayImport()
$tblLines[] = '<b>' . $this->getLanguageService()->getLL('mailgroup_import_or') . '</b>';
$tblLines[] = '';
$tblLines[] = $this->getLanguageService()->getLL('mailgroup_import_paste_csv');
$tblLines[] = '<textarea name="CSV_IMPORT[csv]" rows="25" wrap="off"' . $this->parent->doc->formWidth(48) . '>' . LF . htmlspecialchars($this->indata['csv']) . '</textarea>';
$tblLines[] = '<textarea name="CSV_IMPORT[csv]" rows="25" wrap="off" style="width:460px;">' . LF . htmlspecialchars($this->indata['csv']) . '</textarea>';
$tblLines[] = '<input type="submit" name="CSV_IMPORT[next]" value="' . $this->getLanguageService()->getLL('mailgroup_import_next') . '" />';

$out .= implode('<br />', $tblLines);
Expand Down
12 changes: 6 additions & 6 deletions Classes/Module/Statistics.php
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,7 @@ public function cmd_stats($row)
$emails = array_merge($emails, $idLists['PLAINLIST']);
}
$output .= '<br />' . $this->getLanguageService()->getLL('stats_emails_returned_list') . '<br />';
$output .= '<textarea' . $this->doc->formWidth() . ' rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
$output .= '<textarea style="width:460px;" rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
}
}

Expand Down Expand Up @@ -1157,7 +1157,7 @@ public function cmd_stats($row)
$emails = array_merge($emails, $idLists['PLAINLIST']);
}
$output .='<br />' . $this->getLanguageService()->getLL('stats_emails_returned_unknown_recipient_list') . '<br />';
$output .='<textarea' . $this->doc->formWidth() . ' rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
$output .='<textarea style="width:460px;" rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
}
}

Expand Down Expand Up @@ -1230,7 +1230,7 @@ public function cmd_stats($row)
$emails = array_merge($emails, $idLists['PLAINLIST']);
}
$output .='<br />' . $this->getLanguageService()->getLL('stats_emails_returned_mailbox_full_list') . '<br />';
$output .='<textarea' . $this->doc->formWidth() . ' rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
$output .='<textarea style="width:460px;" rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
}
}

Expand Down Expand Up @@ -1302,7 +1302,7 @@ public function cmd_stats($row)
$emails = array_merge($emails, $idLists['PLAINLIST']);
}
$output .= '<br />' . $this->getLanguageService()->getLL('stats_emails_returned_bad_host_list') . '<br />';
$output .= '<textarea' . $this->doc->formWidth() . ' rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
$output .= '<textarea style="width:460px;" rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
}
}

Expand Down Expand Up @@ -1376,7 +1376,7 @@ public function cmd_stats($row)
$emails = array_merge($emails, $idLists['PLAINLIST']);
}
$output .= '<br />' . $this->getLanguageService()->getLL('stats_emails_returned_bad_header_list') . '<br />';
$output .= '<textarea' . $this->doc->formWidth() . ' rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
$output .= '<textarea style="width:460px;" rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
}
}

Expand Down Expand Up @@ -1450,7 +1450,7 @@ public function cmd_stats($row)
$emails = array_merge($emails, $idLists['PLAINLIST']);
}
$output .= '<br />' . $this->getLanguageService()->getLL('stats_emails_returned_reason_unknown_list') . '<br />';
$output .= '<textarea' . $this->doc->formWidth() . ' rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
$output .= '<textarea style="width:460px;" rows="6" name="nothing">' . LF . htmlspecialchars(implode(LF, $emails)) . '</textarea>';
}
}

Expand Down

0 comments on commit ae434de

Please sign in to comment.