From: Vincent Zanotti Date: Sat, 11 Oct 2008 17:21:03 +0000 (+0200) Subject: Merge commit 'origin/master' into hruid X-Git-Tag: xorg/0.10.0~86^2~10 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4478f95efc07709dbe0a4415e979ff0347651cf8;p=platal.git Merge commit 'origin/master' into hruid Conflicts: modules/email.php templates/emails/redirect.tpl Signed-off-by: Vincent Zanotti --- 4478f95efc07709dbe0a4415e979ff0347651cf8 diff --cc modules/email.php index 38672f3,43e4c19..6f1e98d --- a/modules/email.php +++ b/modules/email.php @@@ -234,10 -218,8 +234,9 @@@ class EmailModule extends PLModul // Since there can be no spaces in emails, we can fix this with : $email = str_replace(' ', '+', $email); + // Apply email redirection change requests. if ($action == 'remove' && $email) { $retour = $redirect->delete_email($email); - $page->assign('retour', $retour); } if ($action == 'active' && $email) { @@@ -268,7 -249,21 +266,22 @@@ } } + switch ($retour) { + case ERROR_INACTIVE_REDIRECTION: + $page->trigError('Tu ne peux pas avoir aucune adresse de redirection active, sinon ton adresse ' - . $forlife . '@' . $globals->mail->domain . ' ne fonctionnerait plus.'); ++ . $user->forlifeEmail() . ' ne fonctionnerait plus.'); + break; + case ERROR_INVALID_EMAIL: + $page->trigError('Erreur: l\'email n\'est pas valide.'); + break; + case ERROR_LOOP_EMAIL: - $page->trigError('Erreur : ' . $forlife . '@' . $globals->mail->domain ++ $page->trigError('Erreur : ' . $user->forlifeEmail() + . ' ne doit pas être renvoyé vers lui-même, ni vers son équivalent en ' + . $globals->mail->domain2 . ' ni vers polytechnique.edu.'); + break; + } + + // Fetch the @alias_dom email alias, if any. $res = XDB::query( "SELECT alias FROM virtual