diff --git a/apps/maarch_entreprise/indexing_searching/search_adv_result.php b/apps/maarch_entreprise/indexing_searching/search_adv_result.php index 610b859be4dd6db12caca3abf65dd795aa6f5425..682a4c8bfb4ff3a0bddf2c21321173aae2233428 100755 --- a/apps/maarch_entreprise/indexing_searching/search_adv_result.php +++ b/apps/maarch_entreprise/indexing_searching/search_adv_result.php @@ -378,7 +378,7 @@ where lower(translate(folders.label , 'ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓ $where_request .= " res_id IN ($Liste_Ids) "; - if ($key == 2) { + if ($key == 1) { $where_request .= ') and '; } else { $where_request .= ' or '; @@ -390,7 +390,7 @@ where lower(translate(folders.label , 'ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓ $where_request .= " 1=-1 "; - if ($key == 2) { + if ($key == 1) { $where_request .= ') and '; } else { $where_request .= ' or '; @@ -403,7 +403,7 @@ where lower(translate(folders.label , 'ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓ $where_request .= " 1=-1 "; - if ($key == 2) { + if ($key == 1) { $where_request .= ') and '; } else { $where_request .= ' or '; diff --git a/migration/19.12/migrateVersionAttachments.php b/migration/19.12/migrateVersionAttachments.php index da06af001b3f58ea7a311aa0fc78c37ab13148c4..68417dba38be35b3f968b95c6d8665d429614862 100644 --- a/migration/19.12/migrateVersionAttachments.php +++ b/migration/19.12/migrateVersionAttachments.php @@ -1,7 +1,5 @@ <?php -use SrcCore\models\CoreConfigModel; - require '../../vendor/autoload.php'; chdir('../..'); @@ -79,7 +77,9 @@ foreach ($customs as $custom) { migrateEmailsVersion(['oldResId' => $oldResId, 'newResId' => $newResId]); migrateMessageExchangeVersion(['oldResId' => $oldResId, 'newResId' => $newResId]); migrateShippingVersion(['oldResId' => $oldResId, 'newResId' => $newResId]); - migrateFullText(['newResId' => $newResId, 'customId' => $custom, 'userId' => $masterOwnerId]); + if (in_array($attachmentInfo['status'], ['A_TRA', 'TRA'])) { + migrateFullText(['newResId' => $newResId, 'customId' => $custom, 'userId' => $masterOwnerId]); + } $migrated++; } diff --git a/src/app/convert/scripts/FullTextScript.php b/src/app/convert/scripts/FullTextScript.php index b1cceeb84566a7452b4fdf8d63285ed558d3863f..97b114541101d9b48f6f204ce8416b4045ad4f3a 100644 --- a/src/app/convert/scripts/FullTextScript.php +++ b/src/app/convert/scripts/FullTextScript.php @@ -47,7 +47,7 @@ class FullTextScript $mode = ''; if (array_search('--customId', $args) > 0) { - $cmd = array_search('--limit', $args); + $cmd = array_search('--customId', $args); $customId = $args[$cmd+1]; }