$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-- \nL'équipe de Polytechnique.org\n";
- if (!is_null($this->_mail_ps($isok))) {
- $body .= $this->_mail_ps($isok);
- }
+ . "\n\nCordialement,\n-- \nL'équipe de Polytechnique.org\n"
+ . $this->_mail_ps($isok);
$mailer->setTxtBody(wordwrap($body));
$mailer->send();
protected function _mail_ps($isok)
{
- return null;
+ return '';
}
// }}}
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";
+ return '';
}
+ return "\nPS : pour rappel, en voici le contenu :"
+ . "\n--------------------------------------------------------------------------\n"
+ . $this->art->title()
+ . "\n--------------------------------------------------------------------------\n"
+ . $this->art->body() . "\n\n" . $this->art->append() . "\n";
}
// }}}