Diagnosis: fix queries to find correct session, error with filiere field and multilanguage courses -refs BT#21218

pull/5006/head
NicoDucou 1 year ago
parent a46eeab456
commit 9633b45168
  1. 2
      public/main/inc/lib/sessionmanager.lib.php
  2. 9
      public/main/search/load_search.php

@ -569,7 +569,7 @@ class SessionManager
$rs = Database::query($sql);
if (Database::num_rows($rs) > 0) {
$fieldId = Database::result($rs, 0, 0);
$sqlInjectJoins .= " INNER JOIN $tblExtraFieldValue cfv ON (c.id = cfv.item_id AND cfv.field_id = $fieldId)";
$sqlInjectJoins .= " LEFT JOIN $tblExtraFieldValue cfv ON (c.id = cfv.item_id AND cfv.field_id = $fieldId)";
$where .= " AND (c.course_language = '$isoCode' OR cfv.field_value LIKE '%$language%')";
} else {
$where .= " AND c.course_language = '$isoCode' ";

@ -953,14 +953,15 @@ if (!empty($filterToSend)) {
}
}
break;
case 'extra_filiere':
$filterItem['data'] = $filterItem['data']['extra_filiere'];
break;
}
}
if ($deleteFiliere) {
foreach ($filterToSend['rules'] as &$filterItem) {
if (isset($filterItem['field']) && 'extra_filiere' == $filterItem['field']) {
$filterItem = [];
}
if (isset($filterItem['field']) && 'extra_filiere' == $filterItem['field']) {
$filterItem = [];
}
}
}

Loading…
Cancel
Save