From 68985baeba8d73f69f51828a0b2eae549e2b0e6e Mon Sep 17 00:00:00 2001 From: Guillaume Heurtier <guillaume.heurtier@maarch.org> Date: Mon, 19 Oct 2020 14:07:44 +0200 Subject: [PATCH] FEAT #13271 TIME 0:10 do not check diffusion list if searching on empty roles --- src/app/search/controllers/SearchController.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/app/search/controllers/SearchController.php b/src/app/search/controllers/SearchController.php index 8d533fb3da3..86f3b12343a 100644 --- a/src/app/search/controllers/SearchController.php +++ b/src/app/search/controllers/SearchController.php @@ -42,7 +42,6 @@ use Slim\Http\Request; use Slim\Http\Response; use SrcCore\controllers\AutoCompleteController; use SrcCore\controllers\PreparedClauseController; -use SrcCore\models\CoreConfigModel; use SrcCore\models\DatabaseModel; use SrcCore\models\TextFormatModel; use SrcCore\models\ValidatorModel; @@ -841,22 +840,8 @@ class SearchController ]); } if (in_array(null, $value['values'])) { - $diffListType = []; - if ($roleId == 'dest' || $roleId == 'cc' || $roleId == 'avis') { - $diffListType[] = 'entity_id'; - } - if ($roleId == 'visa' || $roleId == 'sign') { - $diffListType[] = 'VISA_CIRCUIT'; - } - if ($roleId == 'avis' || $roleId == 'avis_cc') { - $diffListType[] = 'AVIS_CIRCUIT'; - } $args['searchWhere'][] = 'res_id not in (select res_id from listinstance where item_mode = ?)'; $args['searchData'][] = $roleId; - if (!empty($diffListType)) { - $args['searchWhere'][] = 'res_id in (select res_id from listinstance where difflist_type in (?))'; - $args['searchData'][] = $diffListType; - } } if (empty($rolesMatch)) { continue; -- GitLab