X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fsurveys.inc.php;h=e2ca7a1bd24f3ee82fe7af810fc2263b224b7f71;hb=85b2b2257110a8c77d70624f0fa9bba402d99e5f;hp=b9967b8de6106a4cd96a5b5db3895f344cbc08e7;hpb=2553b7686e0678b8e27858a7c377e73ecb410aec;p=platal.git diff --git a/include/validations/surveys.inc.php b/include/validations/surveys.inc.php index b9967b8..e2ca7a1 100644 --- a/include/validations/surveys.inc.php +++ b/include/validations/surveys.inc.php @@ -1,6 +1,6 @@ title = $_title; @@ -65,10 +65,11 @@ class SurveyReq extends Validate protected function _mail_body($isok) { + $you_have = ($this->formal ? 'vous aviez' : 'tu avais'); if ($isok) { - return " Le sondage que tu avais proposé vient d'être validé."; + return " Le sondage que $you_have proposé vient d'être validé."; } else { - return " Le sondage que tu avais proposé a été refusé."; + return " Le sondage que $you_have proposé a été refusé."; } } @@ -91,14 +92,9 @@ class SurveyReq extends Validate public function commit() { - $sql = 'INSERT INTO survey_surveys - SET questions={?}, - title={?}, - description={?}, - author_id={?}, - end={?}, - mode={?}, - promos={?}'; + $sql = 'INSERT INTO surveys + SET questions = {?}, title = {?}, description = {?}, + uid = {?}, end = {?},mode = {?}, promos = {?}'; return XDB::execute($sql, serialize($this->questions), $this->title, $this->description, $this->user->id(), $this->end, $this->mode, $this->promos); }