Allow access to list trombi on xnet
[platal.git] / modules / email.php
index c053cfb..be72835 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2007 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -97,7 +97,7 @@ class EmailModule extends PLModule
 
         $page->assign('demande', AliasReq::get_request($uid));
 
-        if ($action == 'suppr' && $value) {
+        if ($action == 'delete' && $value) {
             //Suppression d'un alias
             XDB::execute(
                 'DELETE virtual, virtual_redirect
@@ -335,7 +335,7 @@ class EmailModule extends PLModule
                 if (!empty($bcc)) { $mymail->addBcc($bcc); }
                 if (!empty($to2)) { $mymail->addTo($to2); }
                 if (!empty($cc2)) { $mymail->addCc($cc2); }
-                if (isset($_FILES['uploaded'])) {
+                if (is_uploaded_file($_FILES['uploaded']['tmp_name'])) {
                     $mymail->addAttachment($_FILES['uploaded']['tmp_name'],
                                            $_FILES['uploaded']['type'],
                                            $_FILES['uploaded']['name']);