X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fmarketing.inc.php;h=18a3fe999f71db8926b76d03a5d08b265e4a51fe;hb=e533246cb1d3b9a90534e2ae583d5fb019ff1b3a;hp=af1ef1f8a8fb397273ce570ae6abea90f23fda59;hpb=1972197078da28c109730a59ea1215eaa545a366;p=platal.git diff --git a/include/marketing.inc.php b/include/marketing.inc.php index af1ef1f..18a3fe9 100644 --- a/include/marketing.inc.php +++ b/include/marketing.inc.php @@ -77,7 +77,7 @@ class Marketing global $globals; if ($from == 'staff' || !($user = User::getSilent($sender))) { - return '"L\'équipe de Polytechnique.org" mail->domain . '>'; + return "\"L'équipe de Polytechnique.org\" mail->domain . '>'; } return '"' . $user->fullName() . '" <' . $user->bestEmail() . '>'; } @@ -116,7 +116,7 @@ class Marketing } $sender = substr($this->sender_mail, 1, strpos($this->sender_mail, '"', 2)-1); $text = str_replace(array('%%hash%%', '%%sender%%', '%%personal_notes%%'), - array($this->hash, $this->sender_mail, ''), $text); + array($this->hash, "Cordialement,\n-- \n" . $this->sender_mail, ''), $text); $mailer = new PlMailer(); $mailer->setFrom($this->sender_mail); $mailer->addTo($this->user['mail']); @@ -135,8 +135,8 @@ class Marketing $this->type, $this->data, $this->personal_notes); $this->engine->process($this->user); if ($valid) { - require_once 'validations.inc.php'; - $valid = new MarkReq(User::getSilent($this->sender), $this->user['user'], $this->user['mail'], + $sender = User::getSilent($this->sender); + $valid = new MarkReq($sender, $this->user['user'], $this->user['mail'], $this->from == 'user', $this->type, $this->data, $this->personal_notes); $valid->submit(); } @@ -173,7 +173,7 @@ class Marketing if ($res->numRows() == 0) { return null; } - list ($uid, $email, $type, $data, $from, $senderi, $personal_notes) = $res->fetchOneRow(); + list ($uid, $email, $type, $data, $from, $sender, $personal_notes) = $res->fetchOneRow(); return new Marketing($uid, $email, $type, $data, $from, $sender, $personal_notes); } @@ -248,10 +248,12 @@ class AnnuaireMarketing implements MarketingEngine . "Pour y figurer, il te suffit de visiter cette page ou de copier cette adresse " . "dans la barre de ton navigateur :"; if ($from === null) { - $this->signature = "L'équipe de Polytechnique.org,\n" - . "Le portail des élèves & anciens élèves de l'École polytechnique"; + $page = new XorgPage(); + $page->changeTpl('include/signature.mail.tpl', NO_SKIN); + $page->assign('mail_part', 'text'); + $this->signature = $page->raw(); } else { - $this->signature = "%%sender%%"; + $this->signature = '%%sender%%'; } if (is_null($personal_notes) || $personal_notes == '') { $this->personal_notes = '%%personal_notes%%';