Fix #ygosha5698

This commit is contained in:
Laurent Destailleur
2021-03-22 12:47:23 +01:00
parent 6a0e0f4c06
commit 6063b02bf4
33 changed files with 56 additions and 56 deletions

View File

@@ -154,7 +154,7 @@ if ($object->id > 0) {
// Define a complementary filter for search of next/prev ref.
if (!$user->rights->projet->all->lire) {
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
$projectstatic->next_prev_filter = " rowid in (".(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
}
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
@@ -278,7 +278,7 @@ if ($object->id > 0) {
if (!GETPOST('withproject') || empty($projectstatic->id)) {
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
$object->next_prev_filter = " fk_projet in (".$projectsListId.")";
$object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")";
} else {
$object->next_prev_filter = " fk_projet = ".$projectstatic->id;
}