global $globals;
if ($from == 'staff' || !($user = User::getSilent($sender))) {
- return '"L\'équipe de Polytechnique.org" <register@' . $globals->mail->domain . '>';
+ return "\"L'équipe de Polytechnique.org\" <register@" . $globals->mail->domain . '>';
}
return '"' . $user->fullName() . '" <' . $user->bestEmail() . '>';
}
}
$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']);
$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();
}
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);
}
}
}
- static public function getAliveUsersCount()
- {
- $uf = new UserFilter(new PFC_Not(new UFC_Dead()));
- return $uf->getTotalCount();
- }
-
static public function relance(PlUser &$user, $nbx = -1)
{
global $globals;
if ($nbx < 0) {
- $nbx = self::getAliveUsersCount();
+ $nbx = $globals->core->NbIns;
}
$res = XDB::fetchOneCell('SELECT r.date, r.email, r.bestalias
. "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%%';
$page->assign('intro', $this->getIntro());
$page->assign('u', $user);
$page->assign('sign', $this->getSignature());
- $page->assign('num_users', Marketing::getAliveUsersCount());
$page->assign('personal_notes', $this->getPersonalNotes());
}