From 7263658b61875bc69b6f0efa942bfe96b59aba0f Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Wed, 1 Dec 2004 07:39:54 +0000 Subject: [PATCH] debug --- configs/mails.conf | 2 +- htdocs/inscription/step3.php | 4 ++-- htdocs/profil.php | 4 ++-- htdocs/recovery.php | 8 ++++---- include/identification.inc.php | 6 +++--- include/xorg.mailer.inc.php | 10 +++++----- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configs/mails.conf b/configs/mails.conf index 7ff7679..66ca03a 100644 --- a/configs/mails.conf +++ b/configs/mails.conf @@ -36,7 +36,7 @@ from=Pre-Inscription from="Marketing Polytechnique.org" [inscrire] -from=Pre-Inscription +from="Pre-Inscription" [forums_promo] from=Forums diff --git a/htdocs/inscription/step3.php b/htdocs/inscription/step3.php index 30c909f..1a07c65 100644 --- a/htdocs/inscription/step3.php +++ b/htdocs/inscription/step3.php @@ -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 diff --git a/htdocs/profil.php b/htdocs/profil.php index 3cddc4f..17bfd3f 100644 --- a/htdocs/profil.php +++ b/htdocs/profil.php @@ -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(); diff --git a/htdocs/recovery.php b/htdocs/recovery.php index 5316c0b..13c3f6e 100644 --- a/htdocs/recovery.php +++ b/htdocs/recovery.php @@ -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\" '); + $mymail->setFrom('"Gestion des mots de passe" '); $mymail->addTo($emails); $mymail->setSubject('Ton certificat d\'authentification'); $mymail->setTxtBody("Visite la page suivante qui expire dans six heures : diff --git a/include/identification.inc.php b/include/identification.inc.php index e6f346b..ca3b9ce 100644 --- a/include/identification.inc.php +++ b/include/identification.inc.php @@ -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\" '); + $mailer->setFrom('"Support Polytechnique.org" '); $mailer->addTo("$mailorg@polytechnique.org"); $mailer->setSubject("perte de ton alias $mailorg dans un mois !"); - $mailer->addCc('\"Support Polytechnique.org\" '); + $mailer->addCc('"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". diff --git a/include/xorg.mailer.inc.php b/include/xorg.mailer.inc.php index 3961c9a..8f8152f 100644 --- a/include/xorg.mailer.inc.php +++ b/include/xorg.mailer.inc.php @@ -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'); -- 2.1.4