X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fnl.inc.php;h=fe4114e5d51fedc9bd3db013647bfa1bbeb5a977;hb=83eb558564a59aaf1eca5168511cba7db0410b08;hp=bd27e7133a9027f52924a4cf3263965996f8dd43;hpb=50a40a33a496131e817df875607ea5542d096a64;p=platal.git diff --git a/include/validations/nl.inc.php b/include/validations/nl.inc.php index bd27e71..fe4114e 100644 --- a/include/validations/nl.inc.php +++ b/include/validations/nl.inc.php @@ -1,6 +1,6 @@ Validate($uid, false, 'nl'); + public function __construct($uid, $title, $body, $append) + { + parent::__construct($uid, false, 'nl'); $this->art = new NLArticle($title, $body, $append); } // }}} // {{{ function formu() - function formu() + public function formu() { return 'include/form.valid.nl.tpl'; } // }}} + // {{{ function editor() + + public function editor() + { + return 'include/form.valid.edit-nl.tpl'; + } + + // }}} + // {{{ function handle_editor() + + 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'); + return true; + } + + // }}} // {{{ function _mail_subj - - function _mail_subj() + + protected function _mail_subj() { return "[Polytechnique.org/NL] Proposition d'article dans la NL"; } @@ -57,19 +77,19 @@ class NLReq extends Validate // }}} // {{{ function _mail_body - function _mail_body($isok) + 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é ('.$this->art->title().') a été refusé.'; } } // }}} // {{{ function commit() - function commit() + public function commit() { $nl = new Newsletter(); $nl->saveArticle($this->art); @@ -81,5 +101,5 @@ class NLReq extends Validate // }}} -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>