X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fevts.inc.php;h=01c56582d031919e68cf695e8f9f7905ad6fa03a;hb=ae0508cbd08c4974520a6d3e80df42842ef34c10;hp=56786e00e2cdf62f9ea52a2d580bb77a22067a47;hpb=50a40a33a496131e817df875607ea5542d096a64;p=platal.git diff --git a/include/validations/evts.inc.php b/include/validations/evts.inc.php index 56786e0..01c5658 100644 --- a/include/validations/evts.inc.php +++ b/include/validations/evts.inc.php @@ -37,7 +37,6 @@ class EvtReq extends Validate // {{{ constructor function EvtReq($_titre, $_texte, $_pmin, $_pmax, $_peremption, $_comment, $_uid) { - global $globals; $this->Validate($_uid, false, 'evts'); $this->titre = $_titre; $this->texte = $_texte; @@ -54,6 +53,25 @@ class EvtReq extends Validate { return 'include/form.valid.evts.tpl'; } // }}} + // {{{ functon editor() + + function editor() + { return 'include/form.valid.edit-evts.tpl'; } + + // }}} + // {{{ function handle_editor() + + function handle_editor() + { + $this->titre = Env::v('titre'); + $this->texte = Env::v('texte'); + $this->pmin = Env::i('promo_min'); + $this->pmax = Env::i('promo_max'); + $this->peremption = Env::v('peremption'); + return true; + } + + // }}} // {{{ function _mail_subj function _mail_subj() @@ -78,8 +96,7 @@ class EvtReq extends Validate function commit() { - global $globals; - return $globals->xdb->execute( + return XDB::execute( "INSERT INTO evenements SET user_id = {?}, creation_date=NOW(), titre={?}, texte={?}, peremption={?}, promo_min={?}, promo_max={?}, flags=CONCAT(flags,',valide')",