X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fsurvey%2Fsurvey.inc.php;h=0daa07af4b78150595c547bb6c879186a7f236bc;hb=0dc8c5a4cc2a816f3d67ffe85163e9e77b06f90c;hp=89d674b591f26a3e0620c02fc13f06f898afb5c5;hpb=d0327f6de73e81c4bcc656471ca4161e4f1e1e1b;p=platal.git diff --git a/modules/survey/survey.inc.php b/modules/survey/survey.inc.php index 89d674b..0daa07a 100644 --- a/modules/survey/survey.inc.php +++ b/modules/survey/survey.inc.php @@ -1,6 +1,6 @@ mode == self::MODE_ALL) { $args['promos'] = ''; } + $args['promos'] = str_replace(' ', '', $args['promos']); $this->promos = ($args['promos'] == '' || preg_match('#^(\d{4}-?|(\d{4})?-\d{4})(,(\d{4}-?|(\d{4})?-\d{4}))*$#', $args['promos']))? $args['promos'] : '#'; } // }}} @@ -407,7 +408,7 @@ class Survey public function proposeSurvey() { require_once 'validations.inc.php'; - $surveyreq = new SurveyReq($this->title, $this->description, $this->end, $this->mode, $this->promos, $this->questions, S::v('uid')); + $surveyreq = new SurveyReq($this->title, $this->description, $this->end, $this->mode, $this->promos, $this->questions, S::user()); return $surveyreq->submit(); } // }}}