From 87c12717a742d313b408f27cf3bd4613040b9ba0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 16 Oct 2015 20:16:28 +0200 Subject: [PATCH] NEW The thirdparties tabs, the contacts tabs and the members tabs are now presented using a new top banner, saving space and using a same way to show address, status and navigation arrows. --- htdocs/adherents/agenda.php | 14 +- htdocs/adherents/card.php | 23 ++- htdocs/adherents/card_subscriptions.php | 230 ++++++++++++++---------- htdocs/adherents/document.php | 59 +++--- htdocs/adherents/fiche_subscription.php | 37 ++-- htdocs/adherents/info.php | 25 ++- htdocs/adherents/ldap.php | 49 +++-- htdocs/adherents/note.php | 42 ++--- htdocs/contact/document.php | 2 + htdocs/core/class/html.form.class.php | 10 +- 10 files changed, 258 insertions(+), 233 deletions(-) diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 74036ec8e8d..77fa8022968 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -96,11 +96,11 @@ if ($object->id > 0) // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' '; + print ''.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' '; } // Type - print ''.$langs->trans("Type").''.$adht->getNomUrl(1)."\n"; + print ''.$langs->trans("Type").''.$adht->getNomUrl(1)."\n"; // Morphy print ''.$langs->trans("Nature").''.$object->getmorphylib().''; @@ -116,16 +116,6 @@ if ($object->id > 0) print ''.$langs->trans("UserTitle").''.$object->getCivilityLabel().' '; print ''; - // Lastname - print ''.$langs->trans("Lastname").''.$object->lastname.' '; - print ''; - - // Firstname - print ''.$langs->trans("Firstname").''.$object->firstname.' '; - - // Status - print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; - print ''; print ''; diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 2123b59ab8d..b9224253bac 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1432,13 +1432,6 @@ else print ''.$langs->trans("UserTitle").''.$object->getCivilityLabel().' '; print ''; - // Lastname - print ''.$langs->trans("Lastname").''.$object->lastname.' '; - print ''; - - // Firstname - print ''.$langs->trans("Firstname").''.$object->firstname.' '; - // Password if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { @@ -1559,6 +1552,22 @@ else } print ''; + // Date end subscription + print ''.$langs->trans("SubscriptionEndDate").''; + if ($object->datefin) + { + print dol_print_date($object->datefin,'day'); + if ($object->hasDelay()) { + print " ".img_warning($langs->trans("Late")); + } + } + else + { + print $langs->trans("SubscriptionNotReceived"); + if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // Affiche picto retard uniquement si non brouillon et non resilie + } + print ''; + print "\n"; print "\n"; diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index fb3807fcc5c..fa440c3bac4 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -572,46 +572,150 @@ if ($rowid > 0) dol_banner_tab($object, 'rowid', $linkback); print '
'; + print '
'; print '
'; print ''; - // Login - if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) - { - print ''; - print $showphoto; $showphoto=''; - print ''; - } + // Login + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) + { + print ''; + } - // Type - print '\n"; + // Type + print '\n"; - // Morphy - print ''; - print $showphoto; $showphoto=''; - print ''; + // Morphy + print ''; + print ''; - // Company - print ''; + // Company + print ''; - // Civility - print ''; - print ''; + // Civility + print ''; + print ''; - // Lastname - print ''; - print ''; + // Password + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) + { + print ''; + } - // Firstname - print ''; - print ''; + // Skype + if (! empty($conf->skype->enabled)) + { + print ''; + } - // EMail - print ''; + print '
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
'.$langs->trans("Type").''.$adht->getNomUrl(1)."
'.$langs->trans("Type").''.$adht->getNomUrl(1)."
'.$langs->trans("Nature").''.$object->getmorphylib().'
'.$langs->trans("Nature").''.$object->getmorphylib().'
'.$langs->trans("Company").''.$object->societe.'
'.$langs->trans("Company").''.$object->societe.'
'.$langs->trans("UserTitle").''.$object->getCivilityLabel().' 
'.$langs->trans("UserTitle").''.$object->getCivilityLabel().' 
'.$langs->trans("Lastname").''.$object->lastname.' 
'.$langs->trans("Password").''.preg_replace('/./i','*',$object->pass); + if ((! empty($object->pass) || ! empty($object->pass_crypted)) && empty($object->user_id)) + { + $langs->load("errors"); + $htmltext=$langs->trans("WarningPasswordSetWithNoAccount"); + print ' '.$form->textwithpicto('', $htmltext,1,'warning'); + } + print '
'.$langs->trans("Firstname").''.$object->firstname.' 
'.$langs->trans("Skype").''.dol_print_skype($object->skype,0,$object->fk_soc,1).'
'.$langs->trans("EMail").''.dol_print_email($object->email,0,$object->fk_soc,1).'
'; + + print '
'; + print '
'; + + print '
'; + print ''; + + // Birthday + print ''; - // Status - print ''; + // Public + print ''; + + // Categories + if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) + { + print ''; + print ''; + } + + // Other attributes + $parameters=array('colspan'=>2); + $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook) && ! empty($extrafields->attribute_label)) + { + print $object->showOptionals($extrafields, 'view', $parameters); + } + + // Third party Dolibarr + if (! empty($conf->societe->enabled)) + { + print ''; + } + + // Login Dolibarr + print ''; // Date end subscription print ''; - // Third party Dolibarr - if (! empty($conf->societe->enabled)) - { - print ''; - } - - // Login Dolibarr - print ''; - print "
'.$langs->trans("Birthday").''.dol_print_date($object->birth,'day').'
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'.$langs->trans("Public").''.yn($object->public).'
' . $langs->trans("Categories") . ''; + print $form->showCategories($object->id, 'member', 1); + print '
'; + print ''; + if ($action != 'editthirdparty' && $user->rights->adherent->creer) print ''; + print '
'; + print $langs->trans("LinkedToDolibarrThirdParty"); + print 'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'
'; + print '
'; + if ($action == 'editthirdparty') + { + $htmlname='socid'; + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print $form->select_company($object->fk_soc,'socid','',1); + print '
'; + } + else + { + if ($object->fk_soc) + { + $company=new Societe($db); + $result=$company->fetch($object->fk_soc); + print $company->getNomUrl(1); + } + else + { + print $langs->trans("NoThirdPartyAssociatedToMember"); + } + } + print '
'; + print ''; + if ($action != 'editlogin' && $user->rights->adherent->creer) + { + print ''; + } + print '
'; + print $langs->trans("LinkedToDolibarrUser"); + print ''; + if ($user->rights->user->user->creer) + { + print 'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).''; + } + print '
'; + print '
'; + if ($action == 'editlogin') + { + $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid',''); + } + else + { + if ($object->user_id) + { + $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none'); + } + else print $langs->trans("NoDolibarrAccess"); + } + print '
'.$langs->trans("SubscriptionEndDate").''; @@ -629,76 +733,10 @@ if ($rowid > 0) } print '
'; - print ''; - if ($action != 'editthirdparty' && $user->rights->adherent->creer) print ''; - print '
'; - print $langs->trans("LinkedToDolibarrThirdParty"); - print 'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'),1).'
'; - print '
'; - if ($action == 'editthirdparty') - { - $htmlname='socid'; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print $form->select_company($object->fk_soc,'socid','',1); - print '
'; - } - else - { - if ($object->fk_soc) - { - $company=new Societe($db); - $result=$company->fetch($object->fk_soc); - print $company->getNomUrl(1); - } - else - { - print $langs->trans("NoThirdPartyAssociatedToMember"); - } - } - print '
'; - print ''; - if ($action != 'editlogin' && $user->rights->adherent->creer) print ''; - print '
'; - print $langs->trans("LinkedToDolibarrUser"); - print 'id.'">'.img_edit($langs->trans('SetLinkToUser'),1).'
'; - print '
'; - if ($action == 'editlogin') - { - /*$include=array(); - if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only - { - $include=array($object->user_id,$user->id); - }*/ - $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'userid',''); - } - else - { - if ($object->user_id) - { - $form->form_users($_SERVER['PHP_SELF'].'?rowid='.$object->id,$object->user_id,'none'); - } - else print $langs->trans("NoDolibarrAccess"); - } - print '
\n"; - print '
'; + print "
\n"; + print '
'; dol_fiche_end(); diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 71f1df22937..4dd5fd9bf64 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -83,6 +83,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php * View */ +$form = new Form($db); llxHeader(); @@ -91,19 +92,7 @@ if ($id > 0) $result=$membert->fetch($object->typeid); if ($result > 0) { - /* - * Affichage onglets - */ - if (! empty($conf->notification->enabled)) - $langs->load("mails"); - - $head = member_prepare_head($object); - - $form=new Form($db); - - dol_fiche_head($head, 'document', $langs->trans("Member"),0,'user'); - - + // Construit liste des fichiers $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1); $totalsize=0; @@ -111,34 +100,41 @@ if ($id > 0) { $totalsize+=$file['size']; } + + if (! empty($conf->notification->enabled)) + $langs->load("mails"); + $head = member_prepare_head($object); - print ''; + dol_fiche_head($head, 'document', $langs->trans("Member"),0,'user'); + + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'rowid', $linkback); + + print '
'; + + print '
'; + print '
'; $linkback = ''.$langs->trans("BackToList").''; - // Ref - print ''; - print ''; - // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''; + print ''; } + // Type + print '\n"; + // Morphy - print ''; + print ''; /*print '';*/ print ''; - // Type - print '\n"; - // Company print ''; @@ -146,17 +142,6 @@ if ($id > 0) print ''; print ''; - // Lastname - print ''; - print ''; - - // Firstname - print ''; - print ''; - - // Status - print ''; - // Nbre fichiers print ''; @@ -166,6 +151,8 @@ if ($id > 0) print '
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'rowid', $linkback); - print '
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
'.$langs->trans("Type").''.$membert->getNomUrl(1)."
'.$langs->trans("Nature").''.$object->getmorphylib().'
'.$langs->trans("Nature").''.$object->getmorphylib().''; print $form->showphoto('memberphoto',$object); print '
'.$langs->trans("Type").''.$membert->getNomUrl(1)."
'.$langs->trans("Company").''.$object->societe.'
'.$langs->trans("UserTitle").''.$object->getCivilityLabel().' 
'.$langs->trans("Lastname").''.$object->lastname.' 
'.$langs->trans("Firstname").''.$object->firstname.' 
'.$langs->trans("Status").''.$object->getLibStatut(4).'
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'; print ''; + + dol_fiche_end(); $modulepart = 'member'; $permission = $user->rights->adherent->creer; diff --git a/htdocs/adherents/fiche_subscription.php b/htdocs/adherents/fiche_subscription.php index 6f0177d4b6f..6b980a4df1c 100644 --- a/htdocs/adherents/fiche_subscription.php +++ b/htdocs/adherents/fiche_subscription.php @@ -180,18 +180,24 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') $head[$h][2] = 'info'; $h++; - dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment'); - - print "\n"; print '
'; print ''; print ""; print ""; print "fk_bank."\">"; + + dol_fiche_head($head, 'general', $langs->trans("Subscription"), 0, 'payment'); + + print "\n"; print ''; + $linkback = ''.$langs->trans("BackToList").''; + // Ref - print ''; + print ''; + print ''; // Member $adh->ref=$adh->getFullName($langs); @@ -239,18 +245,18 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') } } - print '
'.$langs->trans("Ref").''.$subscription->ref.' 
'.$langs->trans("Ref").''; + print $form->showrefnav($subscription, 'rowid', $linkback, 1); + print '
'; - print ''; + print '
'; + + dol_fiche_end(); + + print '
'; + print ''; print '       '; print ''; - print ''; - - print ''; + print '
'; + print '
'; print "\n"; - - print ''; - print "\n"; } if ($rowid && $action != 'edit') @@ -355,8 +361,7 @@ if ($rowid && $action != 'edit') print "\n"; print ''; - print "\n"; - + dol_fiche_end(); /* * Barre d'actions @@ -388,6 +393,6 @@ if ($rowid && $action != 'edit') } -$db->close(); - llxFooter(); + +$db->close(); diff --git a/htdocs/adherents/info.php b/htdocs/adherents/info.php index 27f36e9a843..36ed504dd73 100644 --- a/htdocs/adherents/info.php +++ b/htdocs/adherents/info.php @@ -42,23 +42,34 @@ $result=restrictedArea($user,'adherent',$id); * View */ +$form = new Form($db); + llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros'); -$adh = new Adherent($db); -$adh->fetch($id); -$adh->info($id); +$object = new Adherent($db); +$object->fetch($id); +$object->info($id); -$head = member_prepare_head($adh); +$head = member_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("Member"), 0, 'user'); -print '
'; -dol_print_object_info($adh); -print '
'; +$linkback = ''.$langs->trans("BackToList").''; + +dol_banner_tab($object, 'rowid', $linkback); + +print '
'; + +print '
'; + +print '
'; +dol_print_object_info($object); print '
'; +dol_fiche_end(); + llxFooter(); $db->close(); diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index 89572525c32..a2848b655b3 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -44,12 +44,11 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } -$adh = new Adherent($db); -$adh->id = $rowid; -$result=$adh->fetch($rowid); +$object = new Adherent($db); +$result=$object->fetch($rowid); if (! $result) { - dol_print_error($db,"Failed to get adherent: ".$adh->error); + dol_print_error($db,"Failed to get adherent: ".$object->error); exit; } @@ -65,8 +64,8 @@ if ($action == 'dolibarr2ldap') $ldap=new Ldap(); $result=$ldap->connect_bind(); - $info=$adh->_load_ldap_info(); - $dn=$adh->_load_ldap_dn($info); + $info=$object->_load_ldap_info(); + $dn=$object->_load_ldap_dn($info); $olddn=$dn; // We can say that old dn = dn as we force synchro $result=$ldap->update($dn,$info,$user,$olddn); @@ -93,35 +92,27 @@ llxHeader('',$langs->trans("Member"),'EN:Module_Foundations|FR:Module_Adhé $form = new Form($db); -$head = member_prepare_head($adh); +$head = member_prepare_head($object); dol_fiche_head($head, 'ldap', $langs->trans("Member"), 0, 'user'); +$linkback = ''.$langs->trans("BackToList").''; -print ''; +dol_banner_tab($object, 'rowid', $linkback); -// Ref -print ''; -print ''; +print '
'; -// Lastname -print '
'; -print ''; - -// Firstname -print ''; -print ''; +print '
'; +print '
'.$langs->trans("Ref").''; -print $form->showrefnav($adh,'id'); -print '
'.$langs->trans("Lastname").''.$adh->lastname.' 
'.$langs->trans("Firstname").''.$adh->firstname.' 
'; // Login -print ''; +print ''; // Password not crypted if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) { print ''; - print ''; + print ''; print "\n"; } @@ -129,12 +120,12 @@ if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)) { print ''; - print ''; + print ''; print "\n"; } // Type -print '\n"; +print '\n"; $langs->load("admin"); @@ -155,6 +146,8 @@ print '
'.$langs->trans("Login").''.$adh->login.' 
'.$langs->trans("Login").''.$object->login.' 
'.$langs->trans("LDAPFieldPasswordNotCrypted").''.$adh->pass.''.$object->pass.'
'.$langs->trans("LDAPFieldPasswordCrypted").''.$adh->pass_crypted.''.$object->pass_crypted.'
'.$langs->trans("Type").''.$adh->type."
'.$langs->trans("Type").''.$object->type."
'; print ''; +dol_fiche_end(); + /* * Barre d'actions */ @@ -163,7 +156,7 @@ print '
'; if (! empty($conf->global->LDAP_MEMBER_ACTIVE) && $conf->global->LDAP_MEMBER_ACTIVE != 'ldap2dolibarr') { - print ''; + print ''; } print "
\n"; @@ -187,9 +180,9 @@ $ldap=new Ldap(); $result=$ldap->connect_bind(); if ($result > 0) { - $info=$adh->_load_ldap_info(); - $dn=$adh->_load_ldap_dn($info,1); - $search = "(".$adh->_load_ldap_dn($info,2).")"; + $info=$object->_load_ldap_info(); + $dn=$object->_load_ldap_dn($info,1); + $search = "(".$object->_load_ldap_dn($info,2).")"; if (empty($dn)) { diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 79b7db086e6..a895d6cfef8 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -73,33 +73,31 @@ if ($id) print "
"; print ''; - print ''; - - $linkback = ''.$langs->trans("BackToList").''; - - // Reference - print ''; - print ''; - print ''; + $linkback = ''.$langs->trans("BackToList").''; + + dol_banner_tab($object, 'rowid', $linkback); + + print '
'; + + print '
'; + print '
'.$langs->trans('Ref').''; - print $form->showrefnav($object, 'id', $linkback); - print '
'; // Login if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { - print ''; + print ''; } + // Type + print '\n"; + // Morphy - print ''; + print ''; /*print '';*/ print ''; - // Type - print '\n"; - // Company print ''; @@ -107,21 +105,13 @@ if ($id) print ''; print ''; - // Lastname - print ''; - print ''; - - // Firstname - print ''; - - // Status - print ''; - print "
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
'.$langs->trans("Login").' / '.$langs->trans("Id").''.$object->login.' 
'.$langs->trans("Type").''.$adht->getNomUrl(1)."
'.$langs->trans("Nature").''.$object->getmorphylib().'
'.$langs->trans("Nature").''.$object->getmorphylib().''; print $form->showphoto('memberphoto',$member); print '
'.$langs->trans("Type").''.$adht->getNomUrl(1)."
'.$langs->trans("Company").''.$object->societe.'
'.$langs->trans("UserTitle").''.$object->getCivilityLabel().' 
'.$langs->trans("Lastname").''.$object->lastname.' 
'.$langs->trans("Firstname").''.$object->firstname.' 
'.$langs->trans("Status").''.$object->getLibStatut(4).'
"; + + print ''; print '
'; - $colwidth='20'; + $cssclass='titlefield'; $permission = $user->rights->adherent->creer; // Used by the include of notes.tpl.php include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 62822a97690..6cf3daf5cad 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -95,6 +95,8 @@ if ($object->id) $totalsize+=$file['size']; } + $linkback = ''.$langs->trans("BackToList").''; + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', ''); print '
'; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bc1bdf7e790..6b541760a55 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5265,9 +5265,9 @@ class Form $dir=$conf->societe->multidir_output[$entity]; $smallfile=$object->logo; $smallfile=preg_replace('/(\.png|\.gif|\.jpg|\.jpeg|\.bmp)/i','_small\\1',$smallfile); - if ($object->logo) $file=$id.'/logos/thumbs/'.$smallfile; + if (! empty($object->logo)) $file=$id.'/logos/thumbs/'.$smallfile; } - if ($modulepart=='contact') + else if ($modulepart=='contact') { $dir=$conf->societe->multidir_output[$entity].'/contact'; $file=$id.'/photos/'.$object->photo; @@ -5275,19 +5275,19 @@ class Form else if ($modulepart=='userphoto') { $dir=$conf->user->dir_output; - if ($object->photo) $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; + if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility $email=$object->email; } else if ($modulepart=='memberphoto') { $dir=$conf->adherent->dir_output; - if ($object->photo) $file=get_exdir($id, 2, 0, 0, $object, 'invoice_supplier').'photos/'.$object->photo; + if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'invoice_supplier').'photos/'.$object->photo; if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility $email=$object->email; } else { $dir=$conf->$modulepart->dir_output; - if ($object->photo) $file=get_exdir($id, 2, 0, 0, $adherent, 'member').'photos/'.$object->photo; + if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.$object->photo; if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility $email=$object->email; }