X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations.inc.php;h=2d730a2e4773b84f892da216fb6ba9cf8f0819fb;hb=35a224884f65700df59890012f66849d94a3aff7;hp=085fffc5a83a8a25d983056a554497f871bd8528;hpb=59bec5bc5512a4f962ebac7b0346f59cdf56f901;p=platal.git diff --git a/include/validations.inc.php b/include/validations.inc.php index 085fffc..2d730a2 100644 --- a/include/validations.inc.php +++ b/include/validations.inc.php @@ -215,7 +215,7 @@ abstract class Validate $this->trigSuccess('Email de refus envoyé'); return true; } else { - $this->trigError('pas de motivation pour le refus !!!'); + $this->trigError('Pas de motivation pour le refus !!!'); } } @@ -236,8 +236,9 @@ abstract class Validate $body = ($this->user->isFemale() ? "Chère camarade,\n\n" : "Cher camarade,\n\n") . $this->_mail_body($isok) - . (Env::has('comm') ? "\n\n".Env::v('comm') : '') - . "\n\nCordialement,\n\n-- \nL'équipe de Polytechnique.org\n"; + . (Env::has('comm') ? "\n\n" . Env::v('comm') : '') + . "\n\nCordialement,\n-- \nL'équipe de Polytechnique.org\n" + . $this->_mail_ps($isok); $mailer->setTxtBody(wordwrap($body)); $mailer->send(); @@ -333,6 +334,14 @@ abstract class Validate abstract protected function _mail_subj(); // }}} + // {{{ function _mail_ps + + protected function _mail_ps($isok) + { + return ''; + } + + // }}} // {{{ function commit() /** fonction à utiliser pour insérer les données dans x4dat @@ -363,7 +372,7 @@ abstract class Validate static $answers_table; if (!isset($answers_table[$this->type])) { $r = XDB::query("SELECT id, title, answer FROM requests_answers WHERE category = {?}", $this->type); - $answers_table[$this->type] = $r->fetchAllAssoc($r); + $answers_table[$this->type] = $r->fetchAllAssoc(); } return $answers_table[$this->type]; }