diff --git a/htdocs/includes/triggers/interface_webcal.class.php b/htdocs/includes/triggers/interface_webcal.class.php index 498395e76a2..07ec8a416b6 100644 --- a/htdocs/includes/triggers/interface_webcal.class.php +++ b/htdocs/includes/triggers/interface_webcal.class.php @@ -304,7 +304,7 @@ class InterfaceWebCal $this->duree=0; $this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->id); $this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->id); - $this->desc.="\n".$langs->transnoentities("Name").': '.$object->fullname; + $this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname; $this->desc.="\n".$langs->transnoentities("Type").': '.$object->type; $this->desc.="\n".$langs->transnoentities("Author").': '.$user->login; } @@ -318,12 +318,26 @@ class InterfaceWebCal $this->duree=0; $this->texte=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id); $this->desc=$langs->transnoentities("MemberSubscriptionInDolibarr",$object->id); - $this->desc.="\n".$langs->transnoentities("Name").': '.$object->fullname; + $this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname; $this->desc.="\n".$langs->transnoentities("Type").': '.$object->type; $this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount; $this->desc.="\n".$langs->transnoentities("Period").': '.dolibarr_print_date($object->last_subscription_date_start,'day').' - '.dolibarr_print_date($object->last_subscription_date_end,'day'); $this->desc.="\n".$langs->transnoentities("Author").': '.$user->login; } + elseif ($action == 'MEMBER_MODIFY') + { + dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + $langs->load("other"); + $langs->load("members"); + + $this->date=time(); + $this->duree=0; + $this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->id); + $this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->id); + $this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname; + $this->desc.="\n".$langs->transnoentities("Type").': '.$object->type; + $this->desc.="\n".$langs->transnoentities("Author").': '.$user->login; + } elseif ($action == 'MEMBER_RESILIATE') { dolibarr_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); @@ -334,7 +348,7 @@ class InterfaceWebCal $this->duree=0; $this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id); $this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->id); - $this->desc.="\n".$langs->transnoentities("Name").': '.$object->fullname; + $this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname; $this->desc.="\n".$langs->transnoentities("Type").': '.$object->type; $this->desc.="\n".$langs->transnoentities("Author").': '.$user->login; } @@ -348,7 +362,7 @@ class InterfaceWebCal $this->duree=0; $this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->id); $this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->id); - $this->desc.="\n".$langs->transnoentities("Name").': '.$object->fullname; + $this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname; $this->desc.="\n".$langs->transnoentities("Type").': '.$object->type; $this->desc.="\n".$langs->transnoentities("Author").': '.$user->login; } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index d1b646e9192..289869f2e4f 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -360,6 +360,7 @@ Priority=Priority SendAcknowledgementByMail=Send Ack. by mail NoEMail=No EMail Owner=Owner +DetectedVersion=Detected version # Countries CountryFR=France CountryBE=Belgium diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 58d2939dc8a..b4733af7741 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -103,4 +103,5 @@ Int=Int Date=Date DateAndTime=Date and time MemberNotOrNoMoreExpectedToSubscribe=Member not or no more expected to subscribe -AddSubscription=Add subscription \ No newline at end of file +AddSubscription=Add subscription +MemberModifiedInDolibarr=Member modified in Dolibarr \ No newline at end of file diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 36985f16ef8..a518fce3c94 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -361,6 +361,7 @@ Priority=Priorit SendAcknowledgementByMail=Envoi A.R. par mail NoEMail=Pas d'email Owner=Propriétaire +DetectedVersion=Version détectée # Countries CountryFR=France CountryBE=Belgique diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 3ce99f1e0ea..0fdb4a519c4 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -104,3 +104,5 @@ Date=Date DateAndTime=Date et heure MemberNotOrNoMoreExpectedToSubscribe=Non soumis ou plus soumis à cotisation AddSubscription=Ajout adhésion +MemberModifiedInDolibarr=Adhérent modifié dans Dolibarr + diff --git a/htdocs/lib/webcal.class.php b/htdocs/lib/webcal.class.php index 37133af51b9..0edbc96471e 100644 --- a/htdocs/lib/webcal.class.php +++ b/htdocs/lib/webcal.class.php @@ -38,13 +38,13 @@ class Webcal { var $localdb; - + var $error; + var $version; /* Version string from webcalendar. Not defined in 1.0 */ var $date; var $duree = 0; /* Secondes */ var $texte; var $desc; - var $error; /** @@ -103,11 +103,13 @@ class Webcal { $cal_mod_date = strftime('%Y%m%d', time()); $cal_mod_time = strftime('%H%M%S', time()); $cal_duration = round($this->duree / 60); - $cal_priority = 2; - $cal_type = "E"; - $cal_access = "P"; - $cal_name = $this->texte; - $cal_description = $this->desc; + $cal_priority = 2; // Medium avec 1.0, Haute avec 1.1 + // Rem: 1.0: 1=bas, 2=medium, 3=haut + // 1.1: 1=haut, 2=haut, 3=haut, 4=medium ... 9=bas + $cal_type = "E"; // Evenement de type "intemporel" + $cal_access = "P"; // Acces publique + $cal_name = $this->texte; // Title for event + $cal_description = $this->desc; // Desc for event $sql = "INSERT INTO webcal_entry (cal_id, cal_create_by,cal_date,cal_time,cal_mod_date, cal_mod_time,cal_duration,cal_priority,cal_type, cal_access, cal_name,cal_description)"; $sql.= " VALUES ($cal_id, '$cal_create_by', '$cal_date', '$cal_time', '$cal_mod_date', '$cal_mod_time', $cal_duration, $cal_priority, '$cal_type', '$cal_access', '$cal_name','$cal_description')";