<?php
/***************************************************************************
- * Copyright (C) 2003-2007 Polytechnique.org *
+ * Copyright (C) 2003-2009 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
}
function send_warning_homonyme($prenom, $nom, $forlife, $loginbis) {
+ global $globals;
$cc = "support+homonyme@" . $globals->mail->domain;
$FROM = "\"Support Polytechnique.org\" <$cc>";
$mymail = new PlMailer();
}
function send_robot_homonyme($prenom, $nom, $forlife, $loginbis) {
+ global $globals;
$cc = "support+homonyme@" . $globals->mail->domain;
$FROM = "\"Support Polytechnique.org\" <$cc>";
$mymail = new PlMailer();
$res = XDB::query("SELECT alias FROM aliases WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", $uid);
$bestalias = $res->fetchOneCell();
if ($bestalias && $bestalias != $loginbis) return false;
-
+
// select the shortest alias still alive
$res = XDB::query("SELECT alias FROM aliases WHERE id = {?} AND alias != {?} AND expire IS NULL ORDER BY LENGTH(alias) LIMIT 1", $uid, $loginbis);
$newbest = $res->fetchOneCell();