From 41ec8893e4c2df03d6b09e16c568872ccda10fa6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 29 Mar 2021 22:05:04 +0200 Subject: [PATCH] Fix get mode --- htdocs/projet/ajax/projects.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/ajax/projects.php b/htdocs/projet/ajax/projects.php index e420467d803..22f58f62c90 100644 --- a/htdocs/projet/ajax/projects.php +++ b/htdocs/projet/ajax/projects.php @@ -49,6 +49,7 @@ require '../../main.inc.php'; $htmlname = GETPOST('htmlname', 'aZ09'); $socid = GETPOST('socid', 'int'); +$mode = GETPOST('mode', 'aZ09'); $discard_closed = GETPOST('discardclosed', 'int'); // Security check @@ -71,7 +72,7 @@ if (empty($htmlname) && !GETPOST('mode', 'aZ09')) { } // Mode to get list of projects -if (!GETPOST('mode', 'aZ09') || GETPOST('mode', 'aZ09') != 'gettasks') { +if (empty($mode) || $mode != 'gettasks') { // When used from jQuery, the search term is added as GET param "term". $searchkey = (GETPOSTISSET($htmlname) ? GETPOST($htmlname, 'aZ09') : ''); @@ -80,7 +81,7 @@ if (!GETPOST('mode', 'aZ09') || GETPOST('mode', 'aZ09') != 'gettasks') { } // Mode to get list of tasks -if (GETPOST('mode', 'aZ09') == 'gettasks') { +if ($mode == 'gettasks') { $formproject = new FormProjets($db); $formproject->selectTasks((!empty($$socid) ? $socid : -1), 0, 'taskid', 24, 1, '1', 1, 0, 0, 'maxwidth500', GETPOST('projectid', 'int'), ''); return;