diff --git a/ChangeLog b/ChangeLog index 4a93f86f55d..dad44c4327e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -64,6 +64,7 @@ For users: - Fix: A lot of fixes in PDF generators. - Fix: Bad line/pagebreak with long description of products on PDF. - Fix: Option force invoice date to validation date working correctly. +- Fix: Creation of a member from the example public page works. For translators: - Added 10 more new language files. diff --git a/htdocs/adherents/adherent.class.php b/htdocs/adherents/adherent.class.php index 10146e85b91..193356b527d 100644 --- a/htdocs/adherents/adherent.class.php +++ b/htdocs/adherents/adherent.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo - * Copyright (C) 2004-2007 Laurent Destailleur + * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * @@ -136,7 +136,7 @@ class Adherent extends CommonObject \remarks %INFOS% : l'ensemble des attributs de cet adherent \remarks %SERVEUR% : URL du serveur web \remarks etc.. - */ + */ function send_an_email($text,$subject, $filename_list=array(),$mimetype_list=array(),$mimefilename_list=array(), $addr_cc="",$addr_bcc="",$deliveryreceipt=0,$msgishtml=-1, $errors_to='') @@ -274,8 +274,9 @@ class Adherent extends CommonObject $sql.= " (datec,login,fk_user_author,fk_user_mod,fk_user_valid,morphy,fk_adherent_type)"; $sql.= " VALUES ("; $sql.= " '".$this->db->idate($this->datec)."',"; - $sql.= " '".addslashes($this->login)."',"; - $sql.= " '".$user->id."',null,null,'".$this->morphy."',"; + $sql.= " '".$this->login."',"; + $sql.= " ".($user->id>0?$user->id:"null").","; // Can be null because member can be create by a guest + $sql.= " null,null,'".$this->morphy."',"; $sql.= " '".$this->typeid."'"; $sql.= ")"; @@ -310,6 +311,7 @@ class Adherent extends CommonObject if (sizeof($this->errors)) { + dol_syslog("Adherent::create ".join(',',$this->errors), LOG_ERR); $this->db->rollback(); return -3; } @@ -322,6 +324,7 @@ class Adherent extends CommonObject else { $this->error='Failed to get last insert id'; + dol_syslog("Adherent::create ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } @@ -329,6 +332,7 @@ class Adherent extends CommonObject else { $this->error=$this->db->error(); + dol_syslog("Adherent::create ".$this->error, LOG_ERR); $this->db->rollback(); return -1; } @@ -383,7 +387,7 @@ class Adherent extends CommonObject $sql.= ", naiss=" .($this->naiss?"'".$this->db->idate($this->naiss)."'":"null"); if ($this->datefin) $sql.= ", datefin='".$this->db->idate($this->datefin)."'"; // Ne doit etre modifie que par effacement cotisation if ($this->datevalid) $sql.= ", datevalid='".$this->db->idate($this->datevalid)."'"; // Ne doit etre modifie que par validation adherent - $sql.= ", fk_user_mod=".$user->id; + $sql.= ", fk_user_mod=".($user->id>0?$user->id:'null'); // Can be null because member can be create by a guest $sql.= " WHERE rowid = ".$this->id; dol_syslog("Adherent::update sql=".$sql); diff --git a/htdocs/admin/adherent.php b/htdocs/admin/adherent.php index f35e29a6974..1cf51a46f59 100644 --- a/htdocs/admin/adherent.php +++ b/htdocs/admin/adherent.php @@ -21,11 +21,11 @@ */ /** - \file htdocs/admin/adherent.php - \ingroup adherent - \brief Page d'administration/configuration du module Adherent - \version $Id$ -*/ + * \file htdocs/admin/adherent.php + * \ingroup adherent + * \brief Page d'administration/configuration du module Adherent + * \version $Id$ + */ require("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php"); @@ -34,7 +34,7 @@ $langs->load("admin"); $langs->load("members"); if (!$user->admin) - accessforbidden(); +accessforbidden(); $typeconst=array('yesno','texte','chaine'); @@ -71,12 +71,13 @@ if ($_GET["action"] == 'unset') } +/* + * View + */ llxHeader(); -/* - * Interface de configuration de certaines variables de la partie adherent - */ + $var=True; $linkback=''.$langs->trans("BackToModuleList").''; @@ -157,23 +158,23 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 1) $var=!$var; if ($conf->global->ADHERENT_USE_MAILMAN) { - $lien=img_tick().' '; - $lien.=''.$langs->trans("Disable").''; - // Edition des varibales globales rattache au theme Mailman - $constantes=array('ADHERENT_MAILMAN_LISTS', + $lien=img_tick().' '; + $lien.=''.$langs->trans("Disable").''; + // Edition des varibales globales rattache au theme Mailman + $constantes=array('ADHERENT_MAILMAN_LISTS', 'ADHERENT_MAILMAN_LISTS_COTISANT', 'ADHERENT_MAILMAN_ADMINPW', 'ADHERENT_MAILMAN_SERVER', 'ADHERENT_MAILMAN_UNSUB_URL', 'ADHERENT_MAILMAN_URL' ); - print_fiche_titre("Mailman - Systeme de mailing listes",$lien,''); - form_constantes($constantes); + print_fiche_titre("Mailman - Systeme de mailing listes",$lien,''); + form_constantes($constantes); } else { - $lien=''.$langs->trans("Activate").''; - print_fiche_titre("Mailman - Systeme de mailing listes",$lien,''); + $lien=''.$langs->trans("Activate").''; + print_fiche_titre("Mailman - Systeme de mailing listes",$lien,''); } print "
\n"; @@ -187,145 +188,149 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 1) $var=!$var; if ($conf->global->ADHERENT_USE_SPIP) { - $lien=img_tick().' '; - $lien.=''.$langs->trans("Disable").''; - // Edition des varibales globales rattache au theme Mailman - $constantes=array('ADHERENT_USE_SPIP_AUTO', + $lien=img_tick().' '; + $lien.=''.$langs->trans("Disable").''; + // Edition des varibales globales rattache au theme Mailman + $constantes=array('ADHERENT_USE_SPIP_AUTO', 'ADHERENT_SPIP_SERVEUR', 'ADHERENT_SPIP_DB', 'ADHERENT_SPIP_USER', 'ADHERENT_SPIP_PASS' ); - print_fiche_titre("SPIP - Systeme de publication en ligne",$lien,''); - form_constantes($constantes); + print_fiche_titre("SPIP - Systeme de publication en ligne",$lien,''); + form_constantes($constantes); } else { - $lien=''.$langs->trans("Activate").''; - print_fiche_titre("SPIP - Systeme de publication en ligne",$lien,''); + $lien=''.$langs->trans("Activate").''; + print_fiche_titre("SPIP - Systeme de publication en ligne",$lien,''); } print "
\n"; } /* - * Edition des varibales globales non rattache a un theme specifique + * Edition des variables globales non rattache a un theme specifique */ $constantes=array( - 'ADHERENT_MAIL_VALID_SUBJECT', - 'ADHERENT_MAIL_VALID', - 'ADHERENT_MAIL_COTIS_SUBJECT', - 'ADHERENT_MAIL_COTIS', - 'ADHERENT_MAIL_RESIL_SUBJECT', - 'ADHERENT_MAIL_RESIL', - 'ADHERENT_MAIL_FROM', - 'ADHERENT_CARD_HEADER_TEXT', - 'ADHERENT_CARD_TEXT', - 'ADHERENT_CARD_FOOTER_TEXT', - 'ADHERENT_ETIQUETTE_TYPE' - ); -print_fiche_titre($langs->trans("Other"),'',''); + 'ADHERENT_AUTOREGISTER_MAIL_SUBJECT', + 'ADHERENT_AUTOREGISTER_MAIL', + 'ADHERENT_MAIL_VALID_SUBJECT', + 'ADHERENT_MAIL_VALID', + 'ADHERENT_MAIL_COTIS_SUBJECT', + 'ADHERENT_MAIL_COTIS', + 'ADHERENT_MAIL_RESIL_SUBJECT', + 'ADHERENT_MAIL_RESIL', + 'ADHERENT_MAIL_FROM', + 'ADHERENT_CARD_HEADER_TEXT', + 'ADHERENT_CARD_TEXT', + 'ADHERENT_CARD_FOOTER_TEXT', + 'ADHERENT_ETIQUETTE_TYPE' + ); + print_fiche_titre($langs->trans("Other"),'',''); -print $langs->trans("FollowingConstantsWillBeSubstituted").'
'; -print '%DOL_MAIN_URL_ROOT%, %ID%, %PRENOM%, %NOM%, %LOGIN%, %PASSWORD%,'; -print '%SOCIETE%, %ADRESSE%, %CP%, %VILLE%, %PAYS%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%,'; -//print '%INFOS%'; Deprecated -print '
'; + print $langs->trans("FollowingConstantsWillBeSubstituted").'
'; + print '%DOL_MAIN_URL_ROOT%, %ID%, %PRENOM%, %NOM%, %LOGIN%, %PASSWORD%,'; + print '%SOCIETE%, %ADRESSE%, %CP%, %VILLE%, %PAYS%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%,'; + //print '%INFOS%'; Deprecated + print '
'; -form_constantes($constantes); + form_constantes($constantes); -$db->close(); + $db->close(); -print '
'; + print '
'; -llxFooter('$Date$ - $Revision$'); + llxFooter('$Date$ - $Revision$'); -function form_constantes($tableau) -{ - // Variables globales - global $db,$bc,$langs; - $form = new Form($db); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - $var=true; + function form_constantes($tableau) + { + // Variables globales + global $db,$bc,$langs; + $form = new Form($db); + print '
'.$langs->trans("Description").''.$langs->trans("Value").''.$langs->trans("Type").''.$langs->trans("Action").'
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + $var=true; - foreach($tableau as $const){ - $sql = "SELECT rowid, name, value, type, note FROM ".MAIN_DB_PREFIX."const WHERE name='$const'"; - $result = $db->query($sql); - if ($result && ($db->num_rows() == 1)) { - $obj = $db->fetch_object($result); - $var=!$var; - print ''; - print ''; - print ''; - print ''; - print ''; - - print ""; - - // Affiche nom constante - print '\n"; - - if ($obj->name == 'ADHERENT_ETIQUETTE_TYPE') + foreach($tableau as $const) { - print '"; + + // Affiche nom constante + print '\n"; + + if ($const == 'ADHERENT_ETIQUETTE_TYPE') + { + print ''; + } + + print '\n"; + + print ''; + $i++; + } } - else - { - print ''; - } - - print '\n"; - - print ''; - $i++; + print '
'.$langs->trans("Description").''.$langs->trans("Value").''.$langs->trans("Type").''.$langs->trans("Action").'
'; - print $langs->trans("Desc".$obj->name) != ("Desc".$obj->name) ? $langs->trans("Desc".$obj->name) : $obj->note; - print "'; - // List of possible labels. Values must exists in - // file htdocs/adherents/PDF_Card.class.php - require_once(DOL_DOCUMENT_ROOT.'/includes/modules/member/PDF_card.class.php'); - $pdfcardstatic=new PDF_card('5160',1,1,'mm'); - $arrayoflabels=array_keys($pdfcardstatic->_Avery_Labels); + $sql = "SELECT rowid, name, value, type, note FROM ".MAIN_DB_PREFIX."const WHERE name='".$const."'"; + $result = $db->query($sql); + if ($result) + { + $obj = $db->fetch_object($result); + $var=!$var; + print ''; + print ''; + print ''; + print ''; + print ''; - $form->select_array('constvalue',$arrayoflabels,$obj->value,1,0,1); - print ''; - $form->select_array('consttype',array('yesno','texte','chaine'),1); + print "
'; + print $langs->trans("Desc".$const) != ("Desc".$const) ? $langs->trans("Desc".$const) : $obj->note; + print "'; + // List of possible labels. Values must exists in + // file htdocs/adherents/PDF_Card.class.php + require_once(DOL_DOCUMENT_ROOT.'/includes/modules/member/PDF_card.class.php'); + $pdfcardstatic=new PDF_card('5160',1,1,'mm'); + $arrayoflabels=array_keys($pdfcardstatic->_Avery_Labels); + + $form->select_array('constvalue',$arrayoflabels,$obj->value,1,0,1); + print ''; + $form->select_array('consttype',array('yesno','texte','chaine'),1); + } + else + { + print ''; + if ($obj->type == 'yesno') + { + print $form->selectyesno('constvalue',$obj->value,1); + print ''; + $form->select_array('consttype',array('yesno','texte','chaine'),0); + } + elseif ($obj->type == 'texte') + { + print '\n"; + print ''; + $form->select_array('consttype',array('yesno','texte','chaine'),1); + } + else + { + print ''; + print ''; + $form->select_array('consttype',array('yesno','texte','chaine'),2); + } + print ''; + + print '  '; + // print ''.img_delete().''; + print "
'; - if ($obj->type == 'yesno') - { - print $form->selectyesno('constvalue',$obj->value,1); - print ''; - $form->select_array('consttype',array('yesno','texte','chaine'),0); - } - elseif ($obj->type == 'texte') - { - print '\n"; - print ''; - $form->select_array('consttype',array('yesno','texte','chaine'),1); - } - else - { - print ''; - print ''; - $form->select_array('consttype',array('yesno','texte','chaine'),2); - } - print ''; - - print '  '; - // print ''.img_delete().''; - print "
'; } - } - print ''; -} -?> + ?> diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index b0a29ba77ab..332821c5574 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -122,6 +122,8 @@ AddSubscription=Ajout adhésion ShowSubscription=Afficher adhésion MemberModifiedInDolibarr=Adhérent modifié dans Dolibarr SendAnEMailToMember=Envoyer email d'information à l'adhérent +DescADHERENT_AUTOREGISTER_MAIL_SUBJECT=Sujet du mail envoyé en cas d'autoinscription d'un invité +DescADHERENT_AUTOREGISTER_MAIL=Mail envoyé en cas d'autoinscription d'un invité DescADHERENT_MAIL_VALID_SUBJECT=Sujet du mail de validation adhérent DescADHERENT_MAIL_VALID=Mail de validation adhérent DescADHERENT_MAIL_COTIS_SUBJECT=Sujet du mail de validation cotisation diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 0f9fe2399f2..70bffff3c14 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -1,7 +1,7 @@ * Copyright (C) 2001-2002 Jean-Louis Bergamo - * Copyright (C) 2006-2007 Laurent Destailleur + * Copyright (C) 2006-2009 Laurent Destailleur * * 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 @@ -19,10 +19,10 @@ */ /** - \file htdocs/public/members/new.php - \ingroup adherent - \brief Form example to add a new member - \version $Id$ + * \file htdocs/public/members/new.php + * \ingroup adherent + * \brief Form example to add a new member + * \version $Id$ */ require("../../master.inc.php"); @@ -31,13 +31,16 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php"); require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php"); require_once(DOL_DOCUMENT_ROOT."/html.form.class.php"); +// Define lang object automatically using browser language $langs->setDefaultLang('auto'); +// Load translation files $langs->load("main"); $langs->load("members"); $langs->load("companies"); +// Function for page HTML header function llxHeaderVierge($title, $head = "") { global $user, $conf, $langs; @@ -50,6 +53,7 @@ function llxHeaderVierge($title, $head = "") print "\n"; } +// Function for page HTML footer function llxFooter() { print "\n"; @@ -57,7 +61,7 @@ function llxFooter() } -$adho = new AdherentOptions($db); + $errmsg=''; $num=0; $error=0; @@ -67,43 +71,53 @@ $error=0; /* * Actions */ + +// Action called when submited page if ($_POST["action"] == 'add') { // test si le login existe deja $login=$_POST["login"]; if(!isset($_POST["login"]) || $_POST["login"]='') - { + { $error+=1; - $errmsg .="Login $login vide. Veuillez en positionner un
\n"; + $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Login"))."
\n"; } $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$login."';"; $result = $db->query($sql); - if ($result) { + if ($result) + { $num = $db->num_rows(); } - if (!isset($_POST["nom"]) || !isset($_POST["prenom"]) || $_POST["prenom"]=='' || $_POST["nom"]==''){ + if (!isset($_POST["nom"]) || !isset($_POST["prenom"]) || $_POST["prenom"]=='' || $_POST["nom"]=='') + { $error+=1; - $errmsg .="Nom et Prenom obligatoires
\n"; + $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Name"))."
\n"; } - if (!isset($_POST["email"]) || $_POST["email"] == '' || !ereg('@',$_POST["email"])){ + if (!isset($_POST["email"]) || $_POST["email"] == '' || !ereg('@',$_POST["email"])) + { $error+=1; - $errmsg .="Adresse Email invalide
\n"; + $errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("EMail"))."
\n"; } - if ($num !=0){ + if ($num !=0) + { $error+=1; - $errmsg .="Login ".$login." deja utilise. Veuillez en changer
\n"; + $errmsg .= $langs->trans("ErrorLoginAlreadyUsed")."
\n"; } - if (!isset($_POST["pass1"]) || !isset($_POST["pass2"]) || $_POST["pass1"] == '' || $_POST["pass2"] == '' || $_POST["pass1"]!=$_POST["pass2"]){ + if (!isset($_POST["pass1"]) || !isset($_POST["pass2"]) || $_POST["pass1"] == '' || $_POST["pass2"] == '' || $_POST["pass1"]!=$_POST["pass2"]) + { $error+=1; - $errmsg .="Password invalide
\n"; + $errmsg .= $langs->trans("ErrorPasswordsMustMatch")."
\n"; } - if (isset($_POST["naiss"]) && $_POST["naiss"] !=''){ - if (!preg_match("/^\d\d\d\d-\d\d-\d\d$/",$_POST["naiss"])){ + if (isset($_POST["naiss"]) && $_POST["naiss"] !='') + { + if (!preg_match("/^\d\d\d\d-\d\d-\d\d$/",$_POST["naiss"])) + { $error+=1; - $errmsg .="Date de naissance invalide (Format AAAA-MM-JJ)
\n"; + $errmsg .= $langs->trans("ErrorBadDateFormat")."
\n"; } } - if (isset($public)){ + if (isset($public)) + { $public=1; }else{ $public=0; @@ -143,59 +157,72 @@ if ($_POST["action"] == 'add') { if ($cotisation > 0) { - $adh->cotisation(mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation); + $adh->cotisation(dol_mktime(12, 0 , 0, $remonth, $reday, $reyear), $cotisation); + } + + // Send email to say it has been created and will be validated soon... + if ($conf->global->ADHERENT_AUTOREGISTER_MAIL && $conf->global->ADHERENT_AUTOREGISTER_MAIL_SUBJECT) + { + $result=$adh->send_an_email($conf->global->ADHERENT_AUTOREGISTER_MAIL,$conf->global->ADHERENT_AUTOREGISTER_MAIL_SUBJECT,array(),array(),array(),"","",0,-1); } - // Envoi d'un Email de confirmation au nouvel adherent - $adh->send_an_email($email,$conf->adherent->email_new,$conf->adherent->email_new_subject); Header("Location: new.php?action=added"); exit; } + else + { + $errmsg .= join('
',$adh->errors); + } } } -// On vient de s'inscrire avec succes -if (isset($_GET["action"]) && $_GET["action"] == 'added' && $conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION) +// Action called after a submited was send and member created succesfully +if (isset($_GET["action"]) && $_GET["action"] == 'added') { - // Si conf->global->MEMBER_URL_REDIRECT_SBUSCRIPTION defini, faire redirect sur page. - Header("Location: ".$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION); - exit; + if ($conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION) + { + // Si conf->global->MEMBER_URL_REDIRECT_SBUSCRIPTION defini, faire redirect sur page. + Header("Location: ".$conf->global->MEMBER_URL_REDIRECT_SUBSCRIPTION); + exit; + } + else + { + llxHeaderVierge("New member form"); + + // Si on a pas ete redirige + print '
'; + print ''; + print "\n"; + print '
Nouvel Adherent ajoute. En attente de validation
'; + + llxFooter('$Date$ - $Revision$'); + exit; + } } +/* + * View + */ + llxHeaderVierge("New member form"); $html = new Form($db); print_titre($langs->trans("NewMember")); - -/* ************************************************************************** */ -/* */ -/* Creation d'une fiche - /* */ -/* ************************************************************************** */ - $adht = new AdherentType($db); +$adho = new AdherentOptions($db); // fetch optionals attributes and labels $adho->fetch_name_optionals_label(); -if (isset($_GET["action"]) && $_GET["action"] == 'added') -{ - // Si on a pas ete redirige - print '
'; - print ''; - print "\n"; - print '
Nouvel Adherent ajoute. En attente de validation
'; -} - if ($errmsg != '') { print '
'; print ''; print ''; - print "\n"; + print ''."\n"; // print "$errmsg\n"; print '
Erreur dans le formulaire
'.$errmsg.'
'.$errmsg.'
'; } @@ -213,13 +240,13 @@ print "
\n"; print "
\n"; print ''; -print ''; +print '
'."\n"; print '\n"; -print ''; +print ''."\n"; $morphys["phy"] = "Physique"; $morphys["mor"] = "Morale"; @@ -227,26 +254,26 @@ print '\n"; -print ''; +print ''."\n"; -print ''; +print ''."\n"; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; +print ''."\n"; foreach($adho->attribute_label as $key=>$value){ - print "\n"; + print ""."\n"; } -print ''; +print ''."\n"; print "
'.$langs->trans("Type").''; $html->select_array("type", $adht->liste_array()); print "'.$langs->trans("Comments").' :
'.$langs->trans("Comments").' :
'.$langs->trans("MorPhy")."\n"; $html->select_array("morphy", $morphys); print "
* * '.$langs->trans("Surname").'
* * '.$langs->trans("Surname").'
* * '.$langs->trans("Name").'
'.$langs->trans("ThirdParty").'
'.$langs->trans("Address").''; -print '
'.$langs->trans("Zip").'/'.$langs->trans("Town").'
'.$langs->trans("Country").'
* * Email
* '.$langs->trans("Login").'
* '.$langs->trans("Password").'
Date de naissance
Format AAAA-MM-JJ
* URL Photo
'.$langs->trans("Public").' ?
* * '.$langs->trans("Name").'
'.$langs->trans("ThirdParty").'
'.$langs->trans("Address").''."\n"; +print '
'.$langs->trans("Zip").'/'.$langs->trans("Town").'
'.$langs->trans("Country").'
* * Email
* '.$langs->trans("Login").'
* '.$langs->trans("Password").'
Date de naissance
Format AAAA-MM-JJ
* URL Photo
'.$langs->trans("Public").' ?
$value
$value
\n"; print "
\n"; diff --git a/mysql/migration/2.5.0-2.6.0.sql b/mysql/migration/2.5.0-2.6.0.sql index 243e41dcdba..8a0dc40576c 100644 --- a/mysql/migration/2.5.0-2.6.0.sql +++ b/mysql/migration/2.5.0-2.6.0.sql @@ -65,6 +65,7 @@ ALTER TABLE llx_adherent ADD UNIQUE INDEX uk_adherent_login (login); ALTER TABLE llx_adherent add column fk_soc integer NULL after societe; ALTER TABLE llx_adherent ADD INDEX idx_adherent_fk_soc (fk_soc); ALTER TABLE llx_adherent ADD CONSTRAINT adherent_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); +ALTER TABLE llx_adherent modify column fk_user_author integer NULL; ALTER TABLE llx_societe drop column rubrique; diff --git a/mysql/tables/llx_adherent.sql b/mysql/tables/llx_adherent.sql index d19d676b9dd..e2c2b2d0804 100644 --- a/mysql/tables/llx_adherent.sql +++ b/mysql/tables/llx_adherent.sql @@ -1,7 +1,7 @@ -- =================================================================== -- Copyright (C) 2002-2004 Rodolphe Quiedeville -- Copyright (C) 2002-2003 Jean-Louis Bergamo --- Copyright (C) 2006 Laurent Destailleur +-- Copyright (C) 2006-2009 Laurent Destailleur -- -- 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 @@ -53,7 +53,7 @@ create table llx_adherent datevalid datetime, -- date de validation datec datetime, -- date de creation tms timestamp, -- date de modification - fk_user_author integer NOT NULL, + fk_user_author integer, -- can be null because member can be create by a guest fk_user_mod integer, fk_user_valid integer )type=innodb;