Can set a netmask for ip watch.
[platal.git] / modules / axletter.php
index a94db3a..67833e8 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -159,7 +159,7 @@ class AXLetterModule extends PLModule
                              $id, $shortname, $subject, $title, $body, $signature, $promo_min, $promo_max, $echeance);
                 if (!$saved) {
                     $mailer = new PlMailer();
-                    $mailer->setFrom("support@polytechnique.org");
+                    $mailer->setFrom("support@" . $globals->mail->domain);
                     $mailer->setSubject("Un nouveau projet de mail de l'AX vient d'être proposé");
                     $mailer->setTxtBody("Un nouveau mail vient d'être rédigé en prévision d'un envoi prochain. Vous pouvez "
                                       . "le modifier jusqu'à ce qu'il soit verrouillé pour l'envoi\n\n"
@@ -217,7 +217,7 @@ class AXLetterModule extends PLModule
                 $select .= "<option value=\"$stamp\"$sel>{$i}h</option>\n";
             }
             $page->assign('echeance_time', $select);
-        }    
+        }
     }
 
     function handler_cancel(&$page, $force = null)
@@ -319,7 +319,7 @@ class AXLetterModule extends PLModule
                           INNER JOIN auth_user_md5   AS u USING(user_id)
                           INNER JOIN aliases         AS a ON (u.user_id = a.id AND a.type = 'a_vie')");
         $page->assign('admins', $res);
-        
+
         $importer = new CSVImporter('axletter_ins');
         $importer->registerFunction('user_id', 'email vers Id X.org', array($this, 'idFromMail'));
         $importer->forceValue('hash', array($this, 'createHash'));
@@ -344,7 +344,7 @@ class AXLetterModule extends PLModule
             $user  = $email;
             $domain = $globals->mail->domain2;
         } else {
-            list($user, $domain) = explode('@', $email);    
+            list($user, $domain) = explode('@', $email);
         }
         if ($domain != $globals->mail->domain && $domain != $globals->mail->domain2
                 && $domain != $globals->mail->alias_dom && $domain != $globals->mail->alias_dom2) {