X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fnl.inc.php;h=728bf38a7298c65e5309ffa9f864159584a4ced7;hb=6859200d482b72f9dc6483a3c27621d6e945736d;hp=0a385acfc2de90b2ace3cd40980f45e894f7b3ea;hpb=956cd5c10a027f75283d91545a5d5feeed1874ef;p=platal.git diff --git a/include/validations/nl.inc.php b/include/validations/nl.inc.php index 0a385ac..728bf38 100644 --- a/include/validations/nl.inc.php +++ b/include/validations/nl.inc.php @@ -33,7 +33,7 @@ class NLReq extends Validate // }}} // {{{ constructor - public function __construct(User &$_user, $_title, $_body, $_append) + public function __construct(User $_user, $_title, $_body, $_append) { parent::__construct($_user, false, 'nl'); $this->art = new NLArticle($_title, $_body, $_append); @@ -79,10 +79,11 @@ class NLReq extends Validate protected function _mail_body($isok) { + $you_have = ($this->formal ? 'vous aviez' : 'tu avais'); if ($isok) { - return " L'article que tu avais proposé (" . $this->art->title() . ") vient d'être validé."; + return " L'article que $you_have proposé (" . $this->art->title() . ") vient d'être validé."; } else { - return " L'article que tu avais proposé a été refusé."; + return " L'article que $you_have proposé a été refusé."; } } @@ -106,7 +107,7 @@ class NLReq extends Validate public function commit() { - $nl = NewsLetter::forGroup(NewsLetter::GROUP_XORG)->getPendingIssue(); + $nl = NewsLetter::forGroup(NewsLetter::GROUP_XORG)->getPendingIssue(true); $nl->saveArticle($this->art); return true; }