Merge remote branch 'origin/platal-1.0.1'
[platal.git] / modules / email.php
index bfcbf06..6f85504 100644 (file)
@@ -106,8 +106,6 @@ class EmailModule extends PLModule
 
     function handler_alias(&$page, $action = null, $value = null)
     {
-        require_once 'validations.inc.php';
-
         global $globals;
 
         $page->changeTpl('emails/alias.tpl');
@@ -171,9 +169,9 @@ class EmailModule extends PLModule
                 }
 
                 //vérifier que l'alias n'est pas déja en demande
-                $it = new ValidateIterator();
+                $it = Validate::iterate('alias');
                 while($req = $it->next()) {
-                    if ($req->type == 'alias' and $req->alias == $alias_mail) {
+                    if ($req->alias == $alias_mail) {
                         $page->trigError("L'alias $alias_mail a déja été demandé.
                                     Tu ne peux donc pas l'obtenir pour l'instant.");
                         return ;