diff --git a/migration/20.10/migrateSQL.php b/migration/20.10/migrateSQL.php index e5ed40dfe519d70242af620f12b6a54abcd5ae07..82015d697582ebd87f3c9ba2bd6aee78cfb42098 100644 --- a/migration/20.10/migrateSQL.php +++ b/migration/20.10/migrateSQL.php @@ -16,6 +16,8 @@ if (is_file("apps/maarch_entreprise/xml/config.json")) { foreach ($REQUESTS as $query) { $db->query($query); } + + printf("Exécution du dernier script sql pour le socle.\n"); } @@ -32,5 +34,7 @@ foreach ($customs as $custom) { foreach ($REQUESTS as $query) { $db->query($query); } + + printf("Exécution du dernier script sql pour le custom {$custom}.\n"); } } diff --git a/src/app/search/controllers/SearchController.php b/src/app/search/controllers/SearchController.php index 188795b7f72a954668277d899c8d36d85daf5334..cb476e79c8d72c8f6a9b50fb894920ee8109fa4c 100644 --- a/src/app/search/controllers/SearchController.php +++ b/src/app/search/controllers/SearchController.php @@ -332,7 +332,8 @@ class SearchController 'fields' => $fields, 'where' => [], 'data' => [], - 'fieldsNumber' => 3 + 'fieldsNumber' => 3, + 'longField' => true ]); $fields = ['title', 'identifier']; @@ -342,7 +343,8 @@ class SearchController 'fields' => $fields, 'where' => [], 'data' => [], - 'fieldsNumber' => 2 + 'fieldsNumber' => 2, + 'longField' => true ]); if (!empty($requestDataDocument['where'])) { @@ -389,7 +391,8 @@ class SearchController 'fields' => $fields, 'where' => [], 'data' => [], - 'fieldsNumber' => 1 + 'fieldsNumber' => 1, + 'longField' => true ]); $subjectGlue = implode(' AND ', $requestData['where']); $attachmentField = AutoCompleteController::getInsensitiveFieldsForRequest(['fields' => ['title']]); diff --git a/src/core/controllers/AutoCompleteController.php b/src/core/controllers/AutoCompleteController.php index cf63f696786b99eef5188270b557ccf036bfd92a..c5677d884265b9856012da622e23829d3c67f940 100755 --- a/src/core/controllers/AutoCompleteController.php +++ b/src/core/controllers/AutoCompleteController.php @@ -945,7 +945,11 @@ class AutoCompleteController } } for ($i = 0; $i < $args['fieldsNumber']; $i++) { - $args['data'][] = ($isIncluded ? "%{$item}" : "%{$item}%"); + if (!empty($args['longField'])) { + $args['data'][] = ($isIncluded ? "%{$item} %" : "%{$item}%"); + } else { + $args['data'][] = ($isIncluded ? "%{$item}" : "%{$item}%"); + } } } }