From 5353e51eb9e288c0906b2c93858f55e7d4592174 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 31 Oct 2009 21:20:41 +0100 Subject: [PATCH] Adds the text of the article in the mail when refused (Closes #991). --- include/validations.inc.php | 8 +++----- include/validations/nl.inc.php | 13 ++++++------- 2 files changed, 9 insertions(+), 12 deletions(-) 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"; } // }}} -- 2.1.4