mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
issue #2409 add search engine filter : expert mode
* new access system not implemented yet * dark mode handled but needs review
This commit is contained in:
@@ -143,6 +143,16 @@ function get_regular_search_results($search, $images_where='')
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// expert
|
||||
//
|
||||
if (isset($search['fields']['expert']) and !empty($search['fields']['expert']['string']))
|
||||
{
|
||||
$has_filters_filled = true;
|
||||
|
||||
$image_ids_for_filter['expert'] = get_quick_search_results($search['fields']['expert']['string'], array())['items'];
|
||||
}
|
||||
|
||||
//
|
||||
// allwords
|
||||
//
|
||||
|
||||
@@ -114,6 +114,11 @@ if ('search' == $page['section'] and isset($page['search_details']))
|
||||
unset($my_search['fields']['tags']);
|
||||
}
|
||||
|
||||
if (isset($my_search['fields']['expert']))
|
||||
{
|
||||
load_language('help_quick_search.lang');
|
||||
}
|
||||
|
||||
if (isset($my_search['fields']['author']) and $display_filters['author']['access'])
|
||||
{
|
||||
$filter_clause = get_clause_for_filter('author');
|
||||
|
||||
@@ -1004,6 +1004,11 @@ function ws_images_filteredSearch_create($params, $service)
|
||||
$search['fields']['ratios'] = $params['ratios'];
|
||||
}
|
||||
|
||||
if (isset($params['expert']))
|
||||
{
|
||||
$search['fields']['expert'] = array('string' => $params['expert']);
|
||||
}
|
||||
|
||||
if ($conf['rate'] and isset($params['ratings']))
|
||||
{
|
||||
$search['fields']['ratings'] = $params['ratings'];
|
||||
|
||||
Reference in New Issue
Block a user