// }}}
// {{{ 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);
protected function handle_editor()
{
- $this->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;
}
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é.";
}
}
public function commit()
{
- $nl = new NewsLetter();
+ $nl = NewsLetter::forGroup(NewsLetter::GROUP_XORG)->getPendingIssue(true);
$nl->saveArticle($this->art);
return true;
}