Uniformizes pid and uid fields in database (Closes #1207).
[platal.git] / include / validations / surveys.inc.php
index b9967b8..8eca5d6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2009 Polytechnique.org                              *
+ *  Copyright (C) 2003-2010 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -91,14 +91,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);
     }