Merge commit 'origin/master' into hruid
authorVincent Zanotti <vincent.zanotti@polytechnique.org>
Sat, 11 Oct 2008 17:21:03 +0000 (19:21 +0200)
committerVincent Zanotti <vincent.zanotti@polytechnique.org>
Sat, 11 Oct 2008 17:21:03 +0000 (19:21 +0200)
Conflicts:
modules/email.php
templates/emails/redirect.tpl

Signed-off-by: Vincent Zanotti <vincent.zanotti@polytechnique.org>
1  2 
modules/admin.php
modules/email.php
modules/lists.php
modules/profile.php
templates/emails/redirect.tpl

Simple merge
@@@ -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) {
              }
          }
  
 -                             . $forlife . '@' . $globals->mail->domain . ' ne fonctionnerait plus.');
+         switch ($retour) {
+           case ERROR_INACTIVE_REDIRECTION:
+             $page->trigError('Tu ne peux pas avoir aucune adresse de redirection active, sinon ton adresse '
 -            $page->trigError('Erreur : ' . $forlife . '@' . $globals->mail->domain
++                             . $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 : ' . $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
Simple merge
Simple merge
Simple merge