X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fnl.inc.php;h=25067a4fd5ba8b27f1df3b112eeee4b804b8925d;hb=16d2c88314364b5e79936f4262d453dff03abdad;hp=fe4114e5d51fedc9bd3db013647bfa1bbeb5a977;hpb=eaf30d86cc99df2414cf4f171a9b0f11b0561e3b;p=platal.git diff --git a/include/validations/nl.inc.php b/include/validations/nl.inc.php index fe4114e..25067a4 100644 --- a/include/validations/nl.inc.php +++ b/include/validations/nl.inc.php @@ -1,6 +1,6 @@ art = new NLArticle($title, $body, $append); + parent::__construct($_user, false, 'nl'); + $this->art = new NLArticle($_title, $_body, $_append); } // }}} @@ -80,18 +80,33 @@ class NLReq extends Validate 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 ''; + } + return "\nPS : pour rappel, en voici le contenu :" + . "\n--------------------------------------------------------------------------\n" + . $this->art->title() + . "\n--------------------------------------------------------------------------\n" + . $this->art->body() . "\n\n" . $this->art->append() . "\n"; + } + + // }}} // {{{ function commit() public function commit() { - $nl = new Newsletter(); + $nl = new NewsLetter(); $nl->saveArticle($this->art); return true; }