X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fevts.inc.php;h=4a3a0ceee64bbd41473cbb4378658b05e9144e66;hb=787bb3d745141f2f85bd947ad7dd775d2c63f908;hp=1adf6db52f244d13203b73d89242f2415f8b3956;hpb=02838718a24585bf72f3e4c26a8e4f1d19817dc9;p=platal.git diff --git a/include/validations/evts.inc.php b/include/validations/evts.inc.php index 1adf6db..4a3a0ce 100644 --- a/include/validations/evts.inc.php +++ b/include/validations/evts.inc.php @@ -30,14 +30,14 @@ class EvtReq extends Validate public $texte; public $pmin; public $pmax; - public $peremption; + public $peremption; public $comment; public $imgtype; public $imgx; public $imgy; public $img; - + // }}} // {{{ constructor @@ -52,7 +52,7 @@ class EvtReq extends Validate $this->comment = $_comment; if ($upload) { $this->readImage($upload); - } + } } // }}} @@ -111,7 +111,7 @@ class EvtReq extends Validate // }}} // {{{ function _mail_subj - + protected function _mail_subj() { return "[Polytechnique.org/EVENEMENTS] Proposition d'événement"; @@ -139,11 +139,32 @@ class EvtReq extends Validate peremption={?}, promo_min={?}, promo_max={?}, flags=CONCAT(flags,',valide')", $this->uid, $this->titre, $this->texte, $this->peremption, $this->pmin, $this->pmax)) { + $eid = XDB::insertId(); if ($this->img) { XDB::execute("INSERT INTO evenements_photo SET eid = {?}, attachmime = {?}, x = {?}, y = {?}, attach = {?}", XDB::insertId(), $this->imgtype, $this->imgx, $this->imgy, $this->img); } + global $globals; + if ($globals->banana->event_forum) { + require_once 'user.func.inc.php'; + $forlife = get_user_forlife($this->uid); + require_once 'banana/forum.inc.php'; + $banana = new ForumsBanana($forlife); + $text = strip_tags($this->texte, '