Fix: Gestion de la date de fin d'adhsion dans synchro LDAP

This commit is contained in:
Laurent Destailleur 2007-05-02 20:38:30 +00:00
parent 21bab05e5a
commit 61bec2ac8c
4 changed files with 15 additions and 0 deletions

View File

@ -1929,6 +1929,9 @@ class Adherent
$this->public=1;
$this->statut=1;
$this->datefin=time();
$this->datevalid=time();
$this->typeid=1; // Id type adherent
$this->type='Type adherent'; // Libellé type adherent
$this->need_subscription=0;
@ -1991,6 +1994,7 @@ class Adherent
if ($this->commentaire && $conf->global->LDAP_FIELD_DESCRIPTION) $info[$conf->global->LDAP_FIELD_DESCRIPTION] = $this->commentaire;
if ($this->naiss && $conf->global->LDAP_FIELD_BIRTHDATE) $info[$conf->global->LDAP_FIELD_BIRTHDATE] = dolibarr_print_date($this->naiss,'dayhourldap');
if ($this->statut && $conf->global->LDAP_FIELD_MEMBER_STATUS) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
if ($this->datefin && $conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dolibarr_print_date($this->datefin,'dayhourldap');
// Subscriptions
if ($this->firstsubscription_date && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dolibarr_print_date($this->firstsubscription_date,'dayhourldap');

View File

@ -72,6 +72,7 @@ if ($_GET["action"] == 'setvalue' && $user->admin)
if (! dolibarr_set_const($db, 'LDAP_FIELD_DESCRIPTION',$_POST["fielddescription"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_BIRTHDATE',$_POST["fieldbirthdate"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_STATUS',$_POST["fieldstatus"])) $error++;
if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION', $_POST["fieldendlastsubscription"])) $error++;
// Subscriptions
if (! dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE', $_POST["fieldfirstsubscriptiondate"])) $error++;
@ -343,6 +344,14 @@ print '</td><td>&nbsp;</td>';
print '<td align="right">&nbsp;</td>';
print '</tr>';
// End last subscriptions
$var=!$var;
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPFieldEndLastSubscription").'</td><td>';
print '<input size="25" type="text" name="fieldendlastsubscription" value="'.$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION.'">';
print '</td><td>&nbsp;</td>';
print '<td align="right">&nbsp;</td>';
print '</tr>';
$var=!$var;
print '<tr '.$bc[$var].'><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td></tr>';
print '</table>';

View File

@ -634,6 +634,7 @@ LDAPFieldBirthdate=Birthdate
LDAPFieldBirthdateExample=Exemple :
LDAPFieldSid=SID
LDAPFieldSidExample=Example : objectsid
LDAPFieldEndLastSubscription=Date of subscription end
LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class)
LDAPSetupNotComplete=LDAP setup not complete (go on others tabs)
LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode.

View File

@ -635,6 +635,7 @@ LDAPFieldBirthdate=Date de naissance
LDAPFieldBirthdateExample=Exemple :
LDAPFieldSid=SID
LDAPFieldSidExample=Exemple : objectsid
LDAPFieldEndLastSubscription=Date fin validité adhésion
LDAPParametersAreStillHardCoded=Les parametres LDAP sont codés en dur (dans classe contact)
LDAPSetupNotComplete=Configuration LDAP incomplète (à compléter sur les autres onglets)
LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Administrateur ou mot de passe non renseigné. Les accès LDAP seront donc anonymes et en lecture seule.