diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index b2ef8e8854b..c54d648cd97 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -431,17 +431,17 @@ foreach ($AdherentType as $key => $adhtype) {
print '
';
print '| '.$adhtype->getNomUrl(1, dol_size(32)).' | ';
print ''.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0 ? $MemberToValidate[$key] : '').' '.$staticmember->LibStatut(-1, $adhtype->subscription, 0, 3).' | ';
- print ''.(isset($MembersValidated[$key]) && ($MembersValidated[$key] - (isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0) > 0) ? $MembersValidated[$key] - (isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0) : '').' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).' | ';
- print ''.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key] : '').' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).' | ';
+ print ''.(isset($MembersValidated[$key]) && ($MembersValidated[$key] - (isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0) > 0) ? $MembersValidated[$key] - (isset($MemberUpToDate[$key]) ? $MemberUpToDate[$key] : 0) : '').' '.$staticmember->LibStatut(1, 1, 0, 3).' | ';
+ print ''.(isset($MemberUpToDate[$key]) && $MemberUpToDate[$key] > 0 ? $MemberUpToDate[$key] : '').' '.$staticmember->LibStatut(1, $adhtype->subscription, $now+10, 3).' | ';
print ''.(isset($MembersResiliated[$key]) && $MembersResiliated[$key] > 0 ? $MembersResiliated[$key] : '').' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).' | ';
print "
\n";
}
print '';
print '| '.$langs->trans("Total").' | ';
-print ''.$SommeA.' '.$staticmember->LibStatut(-1, $adhtype->subscription, 0, 3).' | ';
-print ''.$SommeB.' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).' | ';
-print ''.$SommeC.' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).' | ';
-print ''.$SommeD.' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).' | ';
+print ''.$SommeA.' '.$staticmember->LibStatut(-1, 1, 0, 3).' | ';
+print ''.$SommeB.' '.$staticmember->LibStatut(1, 1, 0, 3).' | ';
+print ''.$SommeC.' '.$staticmember->LibStatut(1, 1, $now+10, 3).' | ';
+print ''.$SommeD.' '.$staticmember->LibStatut(0, 1, 0, 3).' | ';
print '
';
print "\n";
diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php
index 14e0d9c02d1..c4723eacc57 100644
--- a/htdocs/core/class/html.formmail.class.php
+++ b/htdocs/core/class/html.formmail.class.php
@@ -382,8 +382,7 @@ class FormMail extends Form
$listofmimes = array();
$keytoavoidconflict = empty($this->trackid) ? '' : '-'.$this->trackid; // this->trackid must be defined
- if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1'))
- {
+ if (GETPOST('mode', 'alpha') == 'init' || (GETPOST('modelselected') && GETPOST('modelmailselected', 'alpha') && GETPOST('modelmailselected', 'alpha') != '-1')) {
if (!empty($arraydefaultmessage->joinfiles) && is_array($this->param['fileinit']))
{
foreach ($this->param['fileinit'] as $file)