X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fsurveys.inc.php;h=8eca5d6b6d4771460200e0f38d95db18bd14b3c3;hb=9f52839d4a55c6b59ab80af35026a064e007ac72;hp=5a519b41fdcbf43a89204650717e408333f80995;hpb=ebd515f95f03f8a87f9b846d65e179b39a535222;p=platal.git diff --git a/include/validations/surveys.inc.php b/include/validations/surveys.inc.php index 5a519b4..8eca5d6 100644 --- a/include/validations/surveys.inc.php +++ b/include/validations/surveys.inc.php @@ -1,6 +1,6 @@ title = $_title; $this->description = $_description; $this->end = $_end; @@ -91,15 +91,10 @@ class SurveyReq extends Validate public function commit() { - $sql = 'INSERT INTO survey_surveys - SET questions={?}, - title={?}, - description={?}, - author_id={?}, - end={?}, - mode={?}, - promos={?}'; - return XDB::execute($sql, serialize($this->questions), $this->title, $this->description, $this->uid, $this->end, $this->mode, $this->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); } // }}}