<?php
/***************************************************************************
- * Copyright (C) 2003-2006 Polytechnique.org *
+ * Copyright (C) 2003-2008 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
{
// {{{ properties
- var $art;
- var $rules = "Laisser valider par le NL-MASTER";
-
+ public $art;
+ public $rules = "Laisser valider par le NL-MASTER";
+
// }}}
// {{{ constructor
- function NlReq($uid, $title, $body, $append) {
- $this->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()
- function editor()
+ public function editor()
{
return 'include/form.valid.edit-nl.tpl';
}
// }}}
// {{{ function handle_editor()
- function handle_editor()
+ protected function handle_editor()
{
$this->art->_body = Env::v('nl_body');
$this->art->_title = Env::v('nl_title');
// }}}
// {{{ function _mail_subj
-
- function _mail_subj()
+
+ protected function _mail_subj()
{
return "[Polytechnique.org/NL] Proposition d'article dans la NL";
}
// }}}
// {{{ 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);
// }}}
-// 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:
?>