Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0

Conflicts:
	htdocs/adherents/list.php
	htdocs/adherents/type.php
	htdocs/core/lib/company.lib.php
This commit is contained in:
Laurent Destailleur
2021-05-03 19:01:47 +02:00
5 changed files with 14 additions and 11 deletions

View File

@@ -812,7 +812,7 @@ while ($i < min($num, $limit)) {
print '</td>';
} else {
print '<td class="nowrap left">';
if ($obj->subscription == 'yes') {
if (!empty($obj->subscription)) {
print $langs->trans("SubscriptionNotReceived");
if ($obj->statut > 0) print " ".img_warning();
} else {

View File

@@ -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 '</td>';
} else {
print '<td class="nowrap left">';
if ($objp->subscription == 'yes') {
if (!empty($objp->subscription)) {
print $langs->trans("SubscriptionNotReceived");
if ($objp->status > 0) print " ".img_warning();
} else {

View File

@@ -1277,7 +1277,10 @@ class ExtraFields
$out .= '</select>';
} 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')
{

View File

@@ -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";

View File

@@ -329,7 +329,7 @@ if ($id > 0 || !empty($ref))
print '</td>';
} else {
print '<td class="left nowrap">';
if ($objp->subscription == 'yes')
if (!empty($objp->subscription))
{
print $langs->trans("SubscriptionNotReceived");
if ($objp->statut > 0) print " ".img_warning();