Adds the text of the article in the mail when refused (Closes #991).
authorStéphane Jacob <sj@m4x.org>
Sat, 31 Oct 2009 20:20:41 +0000 (21:20 +0100)
committerStéphane Jacob <sj@m4x.org>
Sat, 31 Oct 2009 21:47:54 +0000 (22:47 +0100)
include/validations.inc.php
include/validations/nl.inc.php

index aaa6bf5..b6e8472 100644 (file)
@@ -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 '';
     }
 
     // }}}
index 1098673..fc96283 100644 (file)
@@ -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";
     }
 
     // }}}