diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 79aa64fb1ab..945ed849f57 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -83,6 +83,9 @@ class Adherent extends CommonObject var $datevalid; var $birth; + var $note_public; + var $note_private; + var $typeid; // Id type adherent var $type; // Libelle type adherent var $need_subscription; @@ -410,7 +413,9 @@ class Adherent extends CommonObject $this->country_id=($this->country_id > 0?$this->country_id:$this->country_id); $this->state_id=($this->state_id > 0?$this->state_id:$this->state_id); if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords(trim($this->lastname)); - if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords(trim($this->firstname)); + if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords(trim($this->firstname)); + $this->note_public=($this->note_public?$this->note_public:$this->note_public); + $this->note_private=($this->note_private?$this->note_private:$this->note_private); // Check parameters if (! empty($conf->global->ADHERENT_MAIL_REQUIRED) && ! isValidEMail($this->email)) @@ -440,7 +445,7 @@ class Adherent extends CommonObject $sql.= ", phone_perso=" .($this->phone_perso?"'".$this->db->escape($this->phone_perso)."'":"null"); $sql.= ", phone_mobile=" .($this->phone_mobile?"'".$this->db->escape($this->phone_mobile)."'":"null"); $sql.= ", note_private=" .($this->note_private?"'".$this->db->escape($this->note_private)."'":"null"); - $sql.= ", note_public=" .($this->note_private?"'".$this->db->escape($this->note_public)."'":"null"); + $sql.= ", note_public=" .($this->note_public?"'".$this->db->escape($this->note_public)."'":"null"); $sql.= ", photo=" .($this->photo?"'".$this->photo."'":"null"); $sql.= ", public='".$this->public."'"; $sql.= ", statut=" .$this->statut; @@ -1146,11 +1151,11 @@ class Adherent extends CommonObject $this->birth = $this->db->jdate($obj->birthday); $this->note_private = $obj->note_private; - $this->note_public = $obj->note_public; + $this->note_public = $obj->note_public; $this->morphy = $obj->morphy; $this->typeid = $obj->fk_adherent_type; - $this->type = $obj->type; + $this->type = $obj->type; $this->need_subscription = $obj->subscription; $this->user_id = $obj->user_id; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index c026ad859e5..6d2b469fb55 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -238,11 +238,10 @@ if ($action == 'add') $adh->pass = $_POST["pass1"]; } $adh->photo = $_POST["photo"]; - $adh->note = $_POST["note"]; $adh->country_id = $_POST["country_id"]; $adh->state_id = $_POST["state_id"]; $adh->typeid = $_POST["type"]; - $adh->note = $_POST["comment"]; + $adh->note_private= $_POST["note_private"]; $adh->morphy = $_POST["morphy"]; $adh->birth = $birthday; @@ -520,7 +519,7 @@ foreach($extrafields->attribute_label as $key=>$value) // Comments print '