From d1f37d226f0a0d9814475a16155c9f147260afa3 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 5 Jan 2011 15:30:07 +0000 Subject: [PATCH] Fix: full name and firstname with dot for default login --- htdocs/contact/canvas/actions_contactcard_common.class.php | 5 ++--- htdocs/contact/fiche.php | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index d6105d607e1..263627391e2 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2010-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -186,8 +186,7 @@ class ActionsContactCardCommon // Full firstname and name separated with a dot : firstname.name // TODO add function $login=strtolower(dol_string_unaccent($this->object->prenom)) .'.'. strtolower(dol_string_unaccent($this->object->nom)); - $login=str_replace(' ','.',$login); // For particle names - $login=str_replace('\'','',$login); // For simple quote + $login=dol_string_nospecial($login,''); // For special names // Create a form array $formquestion=array(array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login)); diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index e9060d45e7c..08202b1a0c7 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -1,8 +1,8 @@ - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2005-2010 Regis Houssin + * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * * This program is free software; you can redistribute it and/or modify