X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fevts.inc.php;h=01c56582d031919e68cf695e8f9f7905ad6fa03a;hb=c441b5ed3338eed23141f510d89da30fbd81f48a;hp=9bcba199f7d2582a2981af56ba9bb1491177dcf7;hpb=08cce2ff528b38bde27cdec6d6bc28d6af4a42d4;p=platal.git diff --git a/include/validations/evts.inc.php b/include/validations/evts.inc.php index 9bcba19..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,7 +96,6 @@ class EvtReq extends Validate function commit() { - global $globals; return XDB::execute( "INSERT INTO evenements SET user_id = {?}, creation_date=NOW(), titre={?}, texte={?},