Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
Conflicts: htdocs/admin/dict.php htdocs/comm/action/class/actioncomm.class.php htdocs/product/card.php
This commit is contained in:
commit
bb6399e12a
@ -1078,6 +1078,7 @@ if ($id)
|
||||
elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code);
|
||||
elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code);
|
||||
elseif ($search_code != '' && $id == 7) $sql .= natural_search("a.code", $search_code);
|
||||
elseif ($search_code != '' && $id == 10) $sql .= natural_search("t.code", $search_code);
|
||||
elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code);
|
||||
|
||||
if ($sortfield)
|
||||
|
||||
@ -782,13 +782,18 @@ class ActionComm extends CommonObject
|
||||
$this->elementid = $obj->elementid;
|
||||
$this->elementtype = $obj->elementtype;
|
||||
|
||||
$this->fetchResources();
|
||||
}
|
||||
$this->db->free($resql);
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
$this->fetch_optionals();
|
||||
|
||||
$this->fetchResources();
|
||||
}
|
||||
|
||||
$this->db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return $num;
|
||||
}
|
||||
|
||||
@ -78,7 +78,11 @@ class InterfaceContactRoles extends DolibarrTriggers
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
$contactdefault = new Contact($this->db);
|
||||
$contactdefault->socid = $socid;
|
||||
$TContact = $contactdefault->getContactRoles($object->element);
|
||||
|
||||
$TContact = array();
|
||||
if (method_exists($contactdefault, 'getContactRoles')) { // For backward compatibility
|
||||
$TContact = $contactdefault->getContactRoles($object->element);
|
||||
}
|
||||
|
||||
if (is_array($TContact) && !empty($TContact)) {
|
||||
$TContactAlreadyLinked = array();
|
||||
|
||||
@ -495,8 +495,8 @@ if (empty($reshook))
|
||||
if ($accountancy_code_buy_intra <= 0) { $object->accountancy_code_buy_intra = ''; } else { $object->accountancy_code_buy_intra = $accountancy_code_buy_intra; }
|
||||
if ($accountancy_code_buy_export <= 0) { $object->accountancy_code_buy_export = ''; } else { $object->accountancy_code_buy_export = $accountancy_code_buy_export; }
|
||||
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET');
|
||||
if ($ret < 0) $error++;
|
||||
|
||||
if (!$error && $object->check())
|
||||
|
||||
@ -1006,7 +1006,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
||||
if ($search_note) $sql .= natural_search('t.note', $search_note);
|
||||
if ($search_task_ref) $sql .= natural_search('pt.ref', $search_task_ref);
|
||||
if ($search_task_label) $sql .= natural_search('pt.label', $search_task_label);
|
||||
if ($search_user > 0) $sql .= natural_search('t.fk_user', $search_user);
|
||||
if ($search_user > 0) $sql .= natural_search('t.fk_user', $search_user, 2);
|
||||
if ($search_valuebilled == '1') $sql .= ' AND t.invoice_id > 0';
|
||||
if ($search_valuebilled == '0') $sql .= ' AND (t.invoice_id = 0 OR t.invoice_id IS NULL)';
|
||||
$sql .= dolSqlDateFilter('t.task_datehour', $search_day, $search_month, $search_year);
|
||||
@ -1017,6 +1017,12 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0)
|
||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
|
||||
{
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if (! $resql) {
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
|
||||
$nbtotalofrecords = $db->num_rows($resql);
|
||||
if (($page * $limit) > $nbtotalofrecords) // if total of record found is smaller than page * limit, goto and load page 0
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user