fix #20690: add lang filter for people
This commit is contained in:
parent
694357d48e
commit
d2ec1efb42
@ -311,6 +311,13 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
else dol_print_error($this->db);
|
else dol_print_error($this->db);
|
||||||
$s .= '</select>';
|
$s .= '</select>';
|
||||||
|
|
||||||
|
|
||||||
|
//Choose language
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||||
|
$formadmin = new FormAdmin($this->db);
|
||||||
|
$s .= $langs->trans("DefaultLang").': ';
|
||||||
|
$s .= $formadmin->select_language($langs->getDefaultLang(1), 'filter_lang', 0, 0, 1, 0, 0, '', 0, 0, 0, null, 1);
|
||||||
|
|
||||||
return $s;
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,6 +351,7 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
$filter_category = GETPOST('filter_category', 'alpha');
|
$filter_category = GETPOST('filter_category', 'alpha');
|
||||||
$filter_category_customer = GETPOST('filter_category_customer', 'alpha');
|
$filter_category_customer = GETPOST('filter_category_customer', 'alpha');
|
||||||
$filter_category_supplier = GETPOST('filter_category_supplier', 'alpha');
|
$filter_category_supplier = GETPOST('filter_category_supplier', 'alpha');
|
||||||
|
$filter_lang = GETPOST('filter_lang', 'alpha');
|
||||||
|
|
||||||
$cibles = array();
|
$cibles = array();
|
||||||
|
|
||||||
@ -391,6 +399,7 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
if ($filter_category_customer <> 'all') $sql .= " AND c2.label = '".$this->db->escape($filter_category_customer)."'";
|
if ($filter_category_customer <> 'all') $sql .= " AND c2.label = '".$this->db->escape($filter_category_customer)."'";
|
||||||
if ($filter_category_supplier <> 'all') $sql .= " AND c3s.fk_categorie = c3.rowid AND c3s.fk_soc = sp.fk_soc";
|
if ($filter_category_supplier <> 'all') $sql .= " AND c3s.fk_categorie = c3.rowid AND c3s.fk_soc = sp.fk_soc";
|
||||||
if ($filter_category_supplier <> 'all') $sql .= " AND c3.label = '".$this->db->escape($filter_category_supplier)."'";
|
if ($filter_category_supplier <> 'all') $sql .= " AND c3.label = '".$this->db->escape($filter_category_supplier)."'";
|
||||||
|
if ($filter_lang <> '') $sql .= " AND sp.default_lang = '".$this->db->escape($filter_lang)."'";
|
||||||
// Filter on nature
|
// Filter on nature
|
||||||
$key = $filter;
|
$key = $filter;
|
||||||
{
|
{
|
||||||
@ -404,7 +413,7 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
$key = $filter_jobposition;
|
$key = $filter_jobposition;
|
||||||
if (!empty($key) && $key != 'all') $sql .= " AND sp.poste ='".$this->db->escape($key)."'";
|
if (!empty($key) && $key != 'all') $sql .= " AND sp.poste ='".$this->db->escape($key)."'";
|
||||||
$sql .= " ORDER BY sp.email";
|
$sql .= " ORDER BY sp.email";
|
||||||
//print "wwwwwwx".$sql;
|
// print "wwwwwwx".$sql;
|
||||||
|
|
||||||
// Stocke destinataires dans cibles
|
// Stocke destinataires dans cibles
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user