diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 9c9df8e25b5..c45e61bd286 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -812,7 +812,7 @@ while ($i < min($num, $limit)) { print ''; } else { print ''; - if ($obj->subscription == 'yes') { + if (!empty($obj->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($obj->statut > 0) print " ".img_warning(); } else { diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index e9e6be408c8..9512492004c 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -477,7 +477,7 @@ if ($rowid > 0) { $sql .= " AND d.entity IN (".getEntity('adherent').")"; $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 != '') { $sql .= natural_search('d.statut', $status, 2); @@ -660,7 +660,7 @@ if ($rowid > 0) { print ''; } else { print ''; - if ($objp->subscription == 'yes') { + if (!empty($objp->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($objp->status > 0) print " ".img_warning(); } else { diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 7dfc1196a16..2c5ef4ce543 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1277,7 +1277,10 @@ class ExtraFields $out .= ''; } 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 10cec80edda..944b5761bf6 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -833,12 +833,12 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') //E-mail 't.email', ); - //Social media - foreach ($socialnetworks as $key => $value) { - if ($value['active']) { - $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'"; - } - } + //Social media + // 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 3547c5a1e9b..dcdb0e63ffb 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -329,7 +329,7 @@ if ($id > 0 || !empty($ref)) print ''; } else { print ''; - if ($objp->subscription == 'yes') + if (!empty($objp->subscription)) { print $langs->trans("SubscriptionNotReceived"); if ($objp->statut > 0) print " ".img_warning();