debug
authorx2000habouzit <x2000habouzit>
Wed, 1 Dec 2004 07:39:54 +0000 (07:39 +0000)
committerx2000habouzit <x2000habouzit>
Wed, 1 Dec 2004 07:39:54 +0000 (07:39 +0000)
configs/mails.conf
htdocs/inscription/step3.php
htdocs/profil.php
htdocs/recovery.php
include/identification.inc.php
include/xorg.mailer.inc.php

index 7ff7679..66ca03a 100644 (file)
@@ -36,7 +36,7 @@ from=Pre-Inscription <register@polytechnique.org>
 from="Marketing Polytechnique.org" <register@polytechnique.org>
 
 [inscrire]
-from=Pre-Inscription <register@polytechnique.org>
+from="Pre-Inscription" <register@polytechnique.org>
 
 [forums_promo]
 from=Forums <forums@polytechnique.org>
index 30c909f..1a07c65 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: step3.php,v 1.8 2004-11-30 21:11:39 x2000habouzit Exp $
+        $Id: step3.php,v 1.9 2004-12-01 07:39:55 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once("xorg.inc.php");
@@ -58,7 +58,7 @@ if (!isset($_REQUEST["appli_type1"])) $_REQUEST["appli_type1"]=0;
 if (!isset($_REQUEST["appli_type2"])) $_REQUEST["appli_type2"]=0;
 if (!isset($loginbis)) $loginbis="";
 
-$birth = printf("%s-%s-%s", substr($_REQUEST["naissance"],4,4), substr($_REQUEST["naissance"],2,2), substr($_REQUEST["naissance"],0,2));
+$birth = sprintf("%s-%s-%s", substr($_REQUEST["naissance"],4,4), substr($_REQUEST["naissance"],2,2), substr($_REQUEST["naissance"],0,2));
 
 // nouvelle inscription
 $sql="REPLACE INTO  en_cours
index 3cddc4f..17bfd3f 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: profil.php,v 1.17 2004-11-30 21:11:39 x2000habouzit Exp $
+        $Id: profil.php,v 1.18 2004-12-01 07:39:54 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once("xorg.inc.php");
@@ -56,7 +56,7 @@ if (!$naissance)  {
        }
       
        //sinon
-        $birth = printf("%s-%s-%s", substr($_REQUEST["birth"],4,4), substr($_REQUEST["birth"],2,2), substr($_REQUEST["birth"],0,2));
+        $birth = sprintf("%s-%s-%s", substr($_REQUEST["birth"],4,4), substr($_REQUEST["birth"],2,2), substr($_REQUEST["birth"],0,2));
        $globals->db->query("UPDATE auth_user_md5 SET naissance='$birth' WHERE user_id=".$_SESSION['uid']);
        $page->assign('etat_naissance','ok');
        $page->run();
index 5316c0b..13c3f6e 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: recovery.php,v 1.12 2004-11-30 21:11:39 x2000habouzit Exp $
+        $Id: recovery.php,v 1.13 2004-12-01 07:39:54 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once("xorg.inc.php");
@@ -31,7 +31,7 @@ if (isset($_REQUEST['login']) and isset($_REQUEST['birth']))  {
         $page->assign('error', "Date de naissance incorrecte ou incohérente");
         $page->run();
     }
-    $birth = printf("%s-%s-%s", substr($_REQUEST["birth"],4,4), substr($_REQUEST["birth"],2,2), substr($_REQUEST["birth"],0,2));
+    $birth = sprintf("%s-%s-%s", substr($_REQUEST["birth"],4,4), substr($_REQUEST["birth"],2,2), substr($_REQUEST["birth"],0,2));
 
     $mailorg=strtok($_REQUEST['login'],"@");
 
@@ -41,7 +41,7 @@ if (isset($_REQUEST['login']) and isset($_REQUEST['birth']))  {
     $sql="SELECT  user_id, naissance
            FROM  auth_user_md5 AS u
       INNER JOIN  aliases       AS a ON (u.user_id=a.id AND type!='homonyme')
-           WHERE a.alias='$mailorg' AND u.perms IN ('admin','user') AND u.deces!=0";
+           WHERE a.alias='$mailorg' AND u.perms IN ('admin','user') AND u.deces=0";
     $result=$globals->db->query($sql);
     if (list($uid,$naissance)=mysql_fetch_array($result)) {
         if((strlen($naissance))<5) {
@@ -73,7 +73,7 @@ if (isset($_REQUEST['login']) and isset($_REQUEST['birth']))  {
         
        require_once("diogenes.hermes.inc.php");
        $mymail = new HermesMailer();
-       $mymail->setFrom('\"Gestion des mots de passe\" <support+password@polytechnique.org>');
+       $mymail->setFrom('"Gestion des mots de passe" <support+password@polytechnique.org>');
        $mymail->addTo($emails);
        $mymail->setSubject('Ton certificat d\'authentification');
         $mymail->setTxtBody("Visite la page suivante qui expire dans six heures :
index e6f346b..ca3b9ce 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: identification.inc.php,v 1.18 2004-11-18 14:24:02 x2000habouzit Exp $
+        $Id: identification.inc.php,v 1.19 2004-12-01 07:39:55 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once('xorg.misc.inc.php');
@@ -194,10 +194,10 @@ if ( $homonyme ) {
        $globals->db->query("REPLACE INTO homonymes (homonyme_id,user_id) VALUES ($h_id,$h_id)");
        require_once('diogenes.hermes.inc.php');
        $mailer = new HermesMailer();
-       $mailer->setFrom('\"Support Polytechnique.org\" <support@polytechnique.org>');
+       $mailer->setFrom('"Support Polytechnique.org" <support@polytechnique.org>');
        $mailer->addTo("$mailorg@polytechnique.org");
        $mailer->setSubject("perte de ton alias $mailorg dans un mois !");
-       $mailer->addCc('\"Support Polytechnique.org\" <support@polytechnique.org>');
+       $mailer->addCc('"Support Polytechnique.org" <support@polytechnique.org>');
        $msg =
            "Un homonyme s'est inscrit, nous ne pouvons donc garder ton alias '$mailorg'.\n\n".
            "Tu gardes tout de même l'usage de cet alias pour 1 mois encore à compter de ce jour.\n\n".
index 3961c9a..8f8152f 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-    $Id: xorg.mailer.inc.php,v 1.1 2004-11-22 07:40:17 x2000habouzit Exp $
+    $Id: xorg.mailer.inc.php,v 1.2 2004-12-01 07:39:55 x2000habouzit Exp $
  ***************************************************************************/
 
 require_once("diogenes.hermes.inc.php");
@@ -54,16 +54,16 @@ class XOrgMailer extends Smarty
     // }}}
     // {{{ constructor
     
-    function TplMailer($tpl)
+    function XorgMailer($tpl)
     {
         global $globals;
         $this->_tpl = $tpl;
         $this->caching=false;
         $this->compile_check=true;
 
-        $this->template_dir = $globals->spoolroot . "/templates/";
-        $this->compile_dir  = $globals->spoolroot . "/templates_c/";
-        $this->config_dir   = $globals->spoolroot . "/configs/";
+        $this->template_dir = $globals->root . "/templates/";
+        $this->compile_dir  = $globals->root . "/templates_c/";
+        $this->config_dir   = $globals->root . "/configs/";
 
         $this->register_outputfilter('mail_format');
         $this->register_function('from', 'set_from');