X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fnl.inc.php;h=2c17f2bb0cab3a3a6bd1b534963ebe55743558f8;hb=b8bcbe021ba5e7464897a0701a5f78fb8a6d3c0f;hp=c0eecddfd0244ebcd6cc4abdf2a659d8a269626b;hpb=64087a3430249f84d999be01219697c925c5c7f7;p=platal.git diff --git a/include/validations/nl.inc.php b/include/validations/nl.inc.php index c0eecdd..2c17f2b 100644 --- a/include/validations/nl.inc.php +++ b/include/validations/nl.inc.php @@ -1,6 +1,6 @@ art->_body = Env::v('nl_body'); - $this->art->_title = Env::v('nl_title'); - $this->art->_append = Env::v('nl_append'); + $this->art->body = Env::v('nl_body'); + $this->art->title = Env::v('nl_title'); + $this->art->append = Env::v('nl_append'); return true; } @@ -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 = NewsLetter::forGroup(NewsLetter::GROUP_XORG)->getPendingIssue(true); $nl->saveArticle($this->art); return true; }