encoding + bug fix
authorx2000habouzit <x2000habouzit>
Mon, 25 Oct 2004 19:36:11 +0000 (19:36 +0000)
committerx2000habouzit <x2000habouzit>
Mon, 25 Oct 2004 19:36:11 +0000 (19:36 +0000)
htdocs/admin/utilisateurs.php
include/newsletter.inc.php

index 4eb48a8..88fe6d6 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: utilisateurs.php,v 1.24 2004-10-11 18:56:02 x2000habouzit Exp $
+        $Id: utilisateurs.php,v 1.25 2004-10-25 19:36:11 x2000habouzit Exp $
  ***************************************************************************/
 
 require("auto.prepend.inc.php");
@@ -124,7 +124,7 @@ if(isset($mr)) {
                $globals->db->query($query);
                $r=$globals->db->query("SELECT  *
                                          FROM  auth_user_md5 AS u
-                                   INNER JOIN  aliases       AS a ON ( a.id = u.user_id AND a.alias='$login' AND type!='homonyme' )");
+                                   INNER JOIN  aliases       AS a ON ( a.id = u.user_id AND a.id='{$_REQUEST['user_id']}' )");
                if($tmp = mysql_fetch_assoc($r)) $mr=$tmp;
                mysql_free_result($r);
 
index 5b4b17b..5e8b160 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: newsletter.inc.php,v 1.25 2004-10-25 19:28:34 x2000habouzit Exp $
+        $Id: newsletter.inc.php,v 1.26 2004-10-25 19:36:12 x2000habouzit Exp $
  ***************************************************************************/
 
 define('FEMME', 1);
@@ -254,8 +254,9 @@ EOF;
     
     function sendTo($prenom,$nom,$forlife,$sex,$html) {
        require_once('diogenes.mailer.inc.php');
+       $fullname = "=?ISO-8859-1?Q?".quoted_printable_encode(str_replace(' ','_',"$prenom $nom"),200)."?=";
        $mailer = new DiogenesMailer("Lettre Mensuelle Polytechnique.org <info+nlp@polytechnique.org>",
-                                    "$prenom $nom <$forlife@polytechnique.org>",
+                                    "$fullname <$forlife@polytechnique.org>",
                                     $this->title(true),
                                     $html);
        if($html) {