From: Stéphane Jacob Date: Sat, 31 Oct 2009 20:20:41 +0000 (+0100) Subject: Adds the text of the article in the mail when refused (Closes #991). X-Git-Tag: xorg/0.10.2~30 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=5353e51eb9e288c0906b2c93858f55e7d4592174;p=platal.git Adds the text of the article in the mail when refused (Closes #991). --- diff --git a/include/validations.inc.php b/include/validations.inc.php index aaa6bf5..b6e8472 100644 --- a/include/validations.inc.php +++ b/include/validations.inc.php @@ -237,10 +237,8 @@ abstract class Validate $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(); @@ -340,7 +338,7 @@ abstract class Validate protected function _mail_ps($isok) { - return null; + return ''; } // }}} diff --git a/include/validations/nl.inc.php b/include/validations/nl.inc.php index 1098673..fc96283 100644 --- a/include/validations/nl.inc.php +++ b/include/validations/nl.inc.php @@ -92,14 +92,13 @@ class NLReq extends Validate 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"; } // }}}