diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 507695b0ffd..8736500757f 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -599,14 +599,14 @@ class Adherent extends CommonObject $error++; } } + } - if (! $error && ! $notrigger) - { - // Call trigger - $result=$this->call_trigger('MEMBER_MODIFY',$user); - if ($result < 0) { $error++; } - // End call triggers - } + if (! $error && ! $notrigger) + { + // Call trigger + $result=$this->call_trigger('MEMBER_MODIFY',$user); + if ($result < 0) { $error++; } + // End call triggers } if (! $error) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index efa8be0f951..9783fc9911e 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -409,7 +409,7 @@ if (empty($reshook)) $localtax2_tx, $idprod, $productsupplier->product_fourn_price_id, - $productsupplier->fourn_ref, + $productsupplier->ref_supplier, $remise_percent, 'HT', $pu_ttc, diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 9dcd4c67035..1cf2f33980e 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2010,7 +2010,7 @@ class Societe extends CommonObject $hookmanager=new HookManager($this->db); } $hookmanager->initHooks(array('societedao')); - $parameters=array('id'=>$this->id); + $parameters=array('id'=>$this->id, 'linkclose'=>$linkclose); $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; } diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 3779e3ed6fa..9d9b73bad09 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1619,85 +1619,90 @@ else print '
'; - if (! empty($object->email)) + $parameters=array(); + $reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { - $langs->load("mails"); - print '
'.$langs->trans('SendMail').'
'; - } - else - { - $langs->load("mails"); - print '
'.$langs->trans('SendMail').'
'; - } - - if ($caneditfield && (empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) + if (! empty($object->email)) { - print '
'.$langs->trans("Modify").'
'; + $langs->load("mails"); + print '
'.$langs->trans('SendMail').'
'; } else { - print '
'.$langs->trans("Modify").'
'; + $langs->load("mails"); + print '
'.$langs->trans('SendMail').'
'; } - } - elseif ($caneditpassword && ! $object->ldap_sid && - (empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - print '
'.$langs->trans("EditPassword").'
'; - } - // Si on a un gestionnaire de generation de mot de passe actif - if ($conf->global->USER_PASSWORD_GENERATED != 'none') - { - if ($object->statut == 0) + if ($caneditfield && (empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { - print '
'.$langs->trans("ReinitPassword").'
'; + if (! empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) + { + print '
'.$langs->trans("Modify").'
'; + } + else + { + print '
'.$langs->trans("Modify").'
'; + } } - elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && + elseif ($caneditpassword && ! $object->ldap_sid && + (empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) + { + print '
'.$langs->trans("EditPassword").'
'; + } + + // Si on a un gestionnaire de generation de mot de passe actif + if ($conf->global->USER_PASSWORD_GENERATED != 'none') + { + if ($object->statut == 0) + { + print '
'.$langs->trans("ReinitPassword").'
'; + } + elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && + ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) + { + print '
'.$langs->trans("ReinitPassword").'
'; + } + + if ($object->statut == 0) + { + print '
'.$langs->trans("SendNewPassword").'
'; + } + else if (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && + ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) + { + if ($object->email) print '
'.$langs->trans("SendNewPassword").'
'; + else print '
'.$langs->trans("SendNewPassword").'
'; + } + } + + // Activer + if ($user->id <> $id && $candisableuser && $object->statut == 0 && ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { - print '
'.$langs->trans("ReinitPassword").'
'; + print '
'.$langs->trans("Reactivate").'
'; } - - if ($object->statut == 0) - { - print '
'.$langs->trans("SendNewPassword").'
'; - } - else if (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid && + // Desactiver + if ($user->id <> $id && $candisableuser && $object->statut == 1 && ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { - if ($object->email) print '
'.$langs->trans("SendNewPassword").'
'; - else print '
'.$langs->trans("SendNewPassword").'
'; + print '
'.$langs->trans("DisableUser").'
'; } - } - - // Activer - if ($user->id <> $id && $candisableuser && $object->statut == 0 && - ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - print '
'.$langs->trans("Reactivate").'
'; - } - // Desactiver - if ($user->id <> $id && $candisableuser && $object->statut == 1 && - ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - print '
'.$langs->trans("DisableUser").'
'; - } - // Delete - if ($user->id <> $id && $candisableuser && - ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) - { - if ($user->admin || ! $object->admin) // If user edited is admin, delete is possible on for an admin + // Delete + if ($user->id <> $id && $candisableuser && + ((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1))) { - print '
'.$langs->trans("DeleteUser").'
'; - } - else - { - print '
'.$langs->trans("DeleteUser").'
'; + if ($user->admin || ! $object->admin) // If user edited is admin, delete is possible on for an admin + { + print '
'.$langs->trans("DeleteUser").'
'; + } + else + { + print '
'.$langs->trans("DeleteUser").'
'; + } } } - + print "
\n";