diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php
index 947d0a9d2f8..f906c4cab45 100644
--- a/htdocs/comm/action/peruser.php
+++ b/htdocs/comm/action/peruser.php
@@ -49,10 +49,10 @@ $usergroup = GETPOST("search_usergroup", "int", 3) ?GETPOST("search_usergroup",
$showbirthday = 0;
// If not choice done on calendar owner, we filter on user.
-if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS))
+/*if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS))
{
$filtert = $user->id;
-}
+}*/
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php
index 94e885d53dc..b85826339e5 100644
--- a/htdocs/comm/mailing/advtargetemailing.php
+++ b/htdocs/comm/mailing/advtargetemailing.php
@@ -423,24 +423,24 @@ if ($object->fetch($id) >= 0) {
$linkback = ''.$langs->trans("BackToList").'';
- print '
| '.$langs->trans("Ref").' | ';
+ print '
| '.$langs->trans("Ref").' | ';
print '';
print $form->showrefnav($object, 'id', $linkback);
print ' |
';
- print '| '.$langs->trans("MailTitle").' | '.$object->titre.' |
';
+ print '| '.$langs->trans("MailTitle").' | '.$object->titre.' |
';
- print '| '.$langs->trans("MailFrom").' | '.dol_print_email($object->email_from, 0, 0, 0, 0, 1).' |
';
+ print '| '.$langs->trans("MailFrom").' | '.dol_print_email($object->email_from, 0, 0, 0, 0, 1).' |
';
// Errors to
- print '| '.$langs->trans("MailErrorsTo").' | '.dol_print_email($object->email_errorsto, 0, 0, 0, 0, 1);
+ print ' |
| '.$langs->trans("MailErrorsTo").' | '.dol_print_email($object->email_errorsto, 0, 0, 0, 0, 1);
print ' |
';
// Status
- print '| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' |
';
+ print '| '.$langs->trans("Status").' | '.$object->getLibStatut(4).' |
';
// Nb of distinct emails
- print '| ';
+ print ' |
| ';
print $langs->trans("TotalNbOfDistinctRecipients");
print ' | ';
$nbemail = ($object->nbemail ? $object->nbemail : '0');
diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php
index 0b47d8c4aa5..da1775955b7 100644
--- a/htdocs/comm/mailing/class/advtargetemailing.class.php
+++ b/htdocs/comm/mailing/class/advtargetemailing.class.php
@@ -141,7 +141,7 @@ class AdvanceTargetingMailing extends CommonObject
$sql .= " ".(!isset($this->filtervalue) ? 'NULL' : "'".$this->db->escape($this->filtervalue)."'").",";
$sql .= " ".$user->id.",";
$sql .= " '".$this->db->idate(dol_now())."',";
- $sql .= " null";
+ $sql.= " ".$user->id;
$sql .= ")";
$this->db->begin();
diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
index 08736a3d268..f5acafcfb19 100644
--- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
+++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php
@@ -418,9 +418,10 @@ class FormAdvTargetEmailing extends Form
* @param integer $selected defaut selected
* @param integer $showempty empty lines
* @param string $type_element Type element. Example: 'mailing'
+ * @param string $morecss More CSS
* @return string HTML combo
*/
- public function selectAdvtargetemailingTemplate($htmlname = 'template_id', $selected = 0, $showempty = 0, $type_element = 'mailing')
+ public function selectAdvtargetemailingTemplate($htmlname = 'template_id', $selected = 0, $showempty = 0, $type_element = 'mailing', $morecss = '')
{
global $conf, $user, $langs;
@@ -434,7 +435,7 @@ class FormAdvTargetEmailing extends Form
dol_syslog(get_class($this)."::".__METHOD__, LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql) {
- $out .= ' |