X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fvalidations%2Fevts.inc.php;h=7dcbce07e98f81ba548117edc63076a5914c9cdb;hb=f9a8c549deebf96792c3ba423e01545dc7caf95b;hp=ddfdef576c78450faa720340d35982cfbb584d97;hpb=00ca0ad5370df5be4a0272364fb16a4385ffabfe;p=platal.git diff --git a/include/validations/evts.inc.php b/include/validations/evts.inc.php index ddfdef5..7dcbce0 100644 --- a/include/validations/evts.inc.php +++ b/include/validations/evts.inc.php @@ -1,6 +1,6 @@ titre = $_titre; @@ -58,7 +58,7 @@ class EvtReq extends Validate // }}} // {{{ function readImage() - private function readImage(PlUpload &$upload) + private function readImage(PlUpload $upload) { if ($upload->exists() && $upload->isType('image')) { list($this->imgx, $this->imgy, $this->imgtype) = $upload->imageInfo(); @@ -122,10 +122,11 @@ class EvtReq extends Validate protected function _mail_body($isok) { + $you_have = ($this->formal ? 'vous aviez' : 'tu avais'); if ($isok) { - return " L'annonce que tu avais proposée ({$this->titre}) vient d'être validée."; + return " L'annonce que $you_have proposée ({$this->titre}) vient d'être validée."; } else { - return " L'annonce que tu avais proposée ({$this->titre}) a été refusée."; + return " L'annonce que $you_have proposée ({$this->titre}) a été refusée."; } } @@ -134,6 +135,7 @@ class EvtReq extends Validate public function commit() { + /* TODO: refines this filter on promotions by using userfilter. */ if (XDB::execute("INSERT INTO announces SET uid = {?}, creation_date=NOW(), titre={?}, texte={?}, expiration={?}, promo_min={?}, promo_max={?}, flags=CONCAT(flags,',valide,wiki')",