* serendipity_event_mailer now also allows to use commas instead of

spaces to seperate multiple mails. Use distinct email adresses
      (Thanks to evanslee)
This commit is contained in:
Garvin Hicking 2011-01-21 10:35:33 +00:00
parent 77b3d2cfa0
commit 712b43de77
2 changed files with 9 additions and 5 deletions

View File

@ -3,6 +3,10 @@
Version 1.6 () Version 1.6 ()
------------------------------------------------------------------------ ------------------------------------------------------------------------
* serendipity_event_mailer now also allows to use commas instead of
spaces to seperate multiple mails. Use distinct email adresses
(Thanks to evanslee)
* Added new rewrite option for 1&1 specific servers, because a * Added new rewrite option for 1&1 specific servers, because a
combined htaccess for both variants could not be find. The reason combined htaccess for both variants could not be find. The reason
is the MultiViews option in certain apache configs. is the MultiViews option in certain apache configs.

View File

@ -15,7 +15,7 @@ class serendipity_event_mailer extends serendipity_event
$propbag->add('description', PLUGIN_EVENT_MAILER_DESC); $propbag->add('description', PLUGIN_EVENT_MAILER_DESC);
$propbag->add('stackable', false); $propbag->add('stackable', false);
$propbag->add('author', 'Sebastian Nohn, Kristian Koehntopp, Garvin Hicking'); $propbag->add('author', 'Sebastian Nohn, Kristian Koehntopp, Garvin Hicking');
$propbag->add('version', '1.52'); $propbag->add('version', '1.53');
$propbag->add('requirements', array( $propbag->add('requirements', array(
'serendipity' => '0.8', 'serendipity' => '0.8',
'smarty' => '2.6.7', 'smarty' => '2.6.7',
@ -171,7 +171,7 @@ class serendipity_event_mailer extends serendipity_event
if (isset($serendipity['POST']['properties']) && !isset($serendipity['POST']['properties']['sendentry'])) { if (isset($serendipity['POST']['properties']) && !isset($serendipity['POST']['properties']['sendentry'])) {
echo PLUGIN_EVENT_MAILER_NOTSENDDECISION . '<br />'; echo PLUGIN_EVENT_MAILER_NOTSENDDECISION . '<br />';
} else { } else {
$mails = explode(' ', $this->get_config('mailto')); $mails = explode(' ', str_replace(',', '', $this->get_config('mailto')));
$to = array(); $to = array();
foreach($mails AS $mailto) { foreach($mails AS $mailto) {
$mailto = trim($mailto); $mailto = trim($mailto);
@ -193,7 +193,7 @@ class serendipity_event_mailer extends serendipity_event
$mailto = trim($this->get_config('category_' . $cid)); $mailto = trim($this->get_config('category_' . $cid));
if (!empty($mailto) && isset($selected[$cid])) { if (!empty($mailto) && isset($selected[$cid])) {
$tos = explode(' ', $mailto); $tos = explode(' ', str_replace(',', '', $mailto));
foreach($tos AS $mailtopart) { foreach($tos AS $mailtopart) {
$to[] = trim($mailtopart); $to[] = trim($mailtopart);
} }
@ -202,7 +202,7 @@ class serendipity_event_mailer extends serendipity_event
} }
if ($serendipity['POST']['properties']['sendentry_all']) { if ($serendipity['POST']['properties']['sendentry_all']) {
$mails = serendipity_db_query("SELECT email FROM {$serendipity['dbPrefix']}authors"); $mails = serendipity_db_query("SELECT DISTINCT email FROM {$serendipity['dbPrefix']}authors");
foreach($mails AS $mail) { foreach($mails AS $mail) {
$to[] = trim($mail['email']); $to[] = trim($mail['email']);
} }
@ -231,7 +231,7 @@ class serendipity_event_mailer extends serendipity_event
} }
if (isset($serendipity['POST']['properties']['mailto'])) { if (isset($serendipity['POST']['properties']['mailto'])) {
$mails = explode(' ', $serendipity['POST']['properties']['mailto']); $mails = explode(' ', str_replace(',', '', $serendipity['POST']['properties']['mailto']));
foreach($mails as $mailto) { foreach($mails as $mailto) {
$mailto = trim($mailto); $mailto = trim($mailto);
if (!in_array($mailto, $to)) { if (!in_array($mailto, $to)) {