Fix warning

This commit is contained in:
Laurent Destailleur 2022-10-02 13:52:14 +02:00
parent b1ad4d8580
commit dfc4543be2
3 changed files with 6 additions and 4 deletions

View File

@ -397,7 +397,9 @@ function LoadProducts(position, issubcat) {
function MoreProducts(moreorless) {
console.log("MoreProducts");
if ($('#search_pagination').val() != '') return Search2('<?php echo $keyCodeForEnter; ?>', moreorless);
if ($('#search_pagination').val() != '') {
return Search2('<?php echo (isset($keyCodeForEnter) ? $keyCodeForEnter : ''); ?>', moreorless);
}
var maxproduct = <?php echo ($MAXPRODUCT - 2); ?>;

View File

@ -109,8 +109,8 @@ if (in_array('DOLUSERCOOKIE_ticket_by_status', $autosetarray)) {
} elseif (!empty($_COOKIE['DOLUSERCOOKIE_ticket_by_status'])) {
$tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_ticket_by_status'], true);
$endyear = $tmparray['year'];
$shownb = $tmparray['shownb'];
$showtot = $tmparray['showtot'];
$shownb = empty($tmparray['shownb']) ? 0 : $tmparray['shownb'];
$showtot = empty($tmparray['showtot']) ? 0 : $tmparray['showtot'];
}
if (empty($shownb) && empty($showtot)) {
$showtot = 1;

View File

@ -129,7 +129,7 @@ $sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, g.tms as datem
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_rights as ugr ON ugr.fk_usergroup = g.rowid";
if (isModEnabled('multicompany') && $conf->entity == 1 && ($conf->global->MULTICOMPANY_TRANSVERSE_MODE || ($user->admin && !$user->entity))) {
if (isModEnabled('multicompany') && $conf->entity == 1 && (getDolGlobalInt('MULTICOMPANY_TRANSVERSE_MODE') || ($user->admin && !$user->entity))) {
$sql .= " WHERE g.entity IS NOT NULL";
} else {
$sql .= " WHERE g.entity IN (0,".$conf->entity.")";