diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index bf8353da5c9..6c4ff5d03b4 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -865,7 +865,7 @@ while ($i < min($num, $limit)) else { print ''; - if ($obj->subscription == 'yes') + if (!empty($obj->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($obj->statut > 0) print " ".img_warning(); diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index c190398c1db..d8890836bb7 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -510,7 +510,7 @@ if ($rowid > 0) $sql .= " AND t.rowid = ".$object->id; if ($sall) { - $sql .= natural_search(array("f.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall); + $sql .= natural_search(array("d.firstname", "d.lastname", "d.societe", "d.email", "d.login", "d.address", "d.town", "d.note_public", "d.note_private"), $sall); } if ($status != '') { @@ -709,7 +709,7 @@ if ($rowid > 0) else { print ''; - if ($objp->subscription == 'yes') + if (!empty($objp->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($objp->statut > 0) print " ".img_warning(); diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 9d479e31f6c..d657c519650 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1330,7 +1330,10 @@ class ExtraFields } elseif ($type == 'checkbox') { - $value_arr = explode(',', $value); + $value_arr = $value; + if (!is_array($value)) { + $value_arr = explode(',', $value); + } $out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, '', 0, '100%'); } elseif ($type == 'radio') diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 67611649142..2d394bca072 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -907,11 +907,11 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') 't.email', ); //Social media - foreach ($socialnetworks as $key => $value) { - if ($value['active']) { - $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'"; - } - } + // foreach ($socialnetworks as $key => $value) { + // if ($value['active']) { + // $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'"; + // } + // } if (!$sortorder) $sortorder = "ASC"; if (!$sortfield) $sortfield = "t.lastname"; diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index fdba8d6a461..2ee4830eb16 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -337,7 +337,7 @@ if ($id > 0 || !empty($ref)) else { print ''; - if ($objp->subscription == 'yes') + if (!empty($objp->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($objp->statut > 0) print " ".img_warning();