diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index 5941da636..7bb447b7e 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -153,7 +153,8 @@ function get_regular_search_results($search, $images_where='') $has_filters_filled = true; // 1) we search in regular fields (ie, the ones in the piwigo_images table) - $fields = array('file', 'name', 'comment', 'ai_description', 'ocr', 'author'); + $fields = array('file', 'name', 'comment', 'author'); + $fields = trigger_change('get_search_allwords_fields', $fields); if (isset($search['fields']['allwords']['fields']) and count($search['fields']['allwords']['fields']) > 0) { diff --git a/include/ws_functions/pwg.images.php b/include/ws_functions/pwg.images.php index 8f0e861ac..cd443962a 100644 --- a/include/ws_functions/pwg.images.php +++ b/include/ws_functions/pwg.images.php @@ -788,7 +788,8 @@ function ws_images_filteredSearch_create($params, $service) } $search['fields']['allwords']['mode'] = $params['allwords_mode']; - $allwords_fields_available = array('name', 'comment', 'ai_description', 'ocr', 'file', 'author', 'tags', 'cat-title', 'cat-desc'); + $allwords_fields_available = array('name', 'comment', 'file', 'author', 'tags', 'cat-title', 'cat-desc'); + $allwords_fields_available = trigger_change('get_search_allwords_fields', $allwords_fields_available); if (!isset($params['allwords_fields'])) { $params['allwords_fields'] = $allwords_fields_available; diff --git a/search.php b/search.php index 6358c47e0..e28951acf 100644 --- a/search.php +++ b/search.php @@ -80,8 +80,9 @@ if (count($words) > 0 or in_array('allwords', $fields)) $search['fields']['allwords'] = array( 'words' => $words, 'mode' => 'AND', - 'fields' => array('file', 'name', 'comment', 'ai_description', 'ocr', 'tags', 'author', 'cat-title', 'cat-desc'), + 'fields' => array('file', 'name', 'comment', 'tags', 'author', 'cat-title', 'cat-desc'), ); + $search['fields']['allwords']['fields'] = trigger_change('get_search_allwords_fields', $search['fields']['allwords']['fields']); } $cat_ids = array(); diff --git a/themes/default/template/include/search_filters.inc.tpl b/themes/default/template/include/search_filters.inc.tpl index 891899986..2b9091d69 100644 --- a/themes/default/template/include/search_filters.inc.tpl +++ b/themes/default/template/include/search_filters.inc.tpl @@ -251,14 +251,6 @@ const prefix_icon = 'gallery-icon-'; -