* Newsletter:
- #986: Improves the nl edition page -JAC
+ - #991: Adds the text of the article in the mail when refused -JAC
* Profile:
- #983: Fixes issue with the professional email publicity -JAC
$body = ($this->user->isFemale() ? "Chère camarade,\n\n" : "Cher camarade,\n\n")
. $this->_mail_body($isok)
- . (Env::has('comm') ? "\n\n".Env::v('comm') : '')
- . "\n\nCordialement,\n\n-- \nL'équipe de Polytechnique.org\n";
+ . (Env::has('comm') ? "\n\n" . Env::v('comm') : '')
+ . "\n\nCordialement,\n-- \nL'équipe de Polytechnique.org\n";
+ if (!is_null($this->_mail_ps($isok))) {
+ $body .= $this->_mail_ps($isok);
+ }
$mailer->setTxtBody(wordwrap($body));
$mailer->send();
abstract protected function _mail_subj();
// }}}
+ // {{{ function _mail_ps
+
+ protected function _mail_ps($isok)
+ {
+ return null;
+ }
+
+ // }}}
// {{{ function commit()
/** fonction à utiliser pour insérer les données dans x4dat
protected function _mail_body($isok)
{
if ($isok) {
- return ' L\'article que tu avais proposé ('.$this->art->title().') vient d\'être validé.';
+ return " L'article que tu avais proposé (" . $this->art->title() . ") vient d'être validé.";
} else {
- return ' L\'article que tu avais proposé ('.$this->art->title().') a été refusé.';
+ return " L'article que tu avais proposé a été refusé.";
+ }
+ }
+
+ // }}}
+ // {{{ function _mail_ps
+
+ protected function _mail_ps($isok)
+ {
+ if ($isok) {
+ return null;
+ } else {
+ return "\nPS : pour rappel, en voici le contenu :\n"
+ . "--------------------------------------------------------------------------------\n*"
+ . $this->art->title()
+ . "\n--------------------------------------------------------------------------------\n"
+ . $this->art->body() . "\n\n" . $this->art->append() . "\n";
}
}