Project owners can now enter multiple email addresses for each notification type.

Each email must be separated by a comma from the other. (Based on a patch from
Pierre Marechal, fixes issue 372).
This commit is contained in:
Thomas Keller
2010-12-06 00:11:59 +01:00
parent 784c9718eb
commit 51c42a65c5
8 changed files with 163 additions and 96 deletions

View File

@@ -197,14 +197,17 @@ class IDF_Review_Patch extends Pluf_Model
);
$tmpl = new Pluf_Template('idf/review/review-created-email.txt');
$text_email = $tmpl->render($context);
$email = new Pluf_Mail(Pluf::f('from_email'),
$conf->getVal('review_notification_email'),
sprintf(__('New Code Review %s - %s (%s)'),
$this->get_review()->id,
$this->get_review()->summary,
$this->get_review()->get_project()->shortname));
$email->addTextMessage($text_email);
$email->sendMail();
$addresses = explode(';',$conf->getVal('review_notification_email'));
foreach ($addresses as $address) {
$email = new Pluf_Mail(Pluf::f('from_email'),
$address,
sprintf(__('New Code Review %s - %s (%s)'),
$this->get_review()->id,
$this->get_review()->summary,
$this->get_review()->get_project()->shortname));
$email->addTextMessage($text_email);
$email->sendMail();
}
Pluf_Translation::loadSetLocale($current_locale);
}
}