mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-27 19:59:56 +03:00
issue #1869 search filters, optimize filter data loading and match permissions
* only load list of authors if this filter is active (same for tags, added_by...) * if the search_rules include album 123 but this album is not available to current user, remove it from search_rules before sending it to template
This commit is contained in:
parent
3d6c533e98
commit
c01ec38bc4
3 changed files with 157 additions and 142 deletions
|
@ -30,9 +30,14 @@ SELECT rules
|
|||
FROM '.SEARCH_TABLE.'
|
||||
WHERE id = '.$search_id.'
|
||||
;';
|
||||
list($serialized_rules) = pwg_db_fetch_row(pwg_query($query));
|
||||
$rules_list = query2array($query);
|
||||
|
||||
return unserialize($serialized_rules);
|
||||
if (count($rules_list) == 0)
|
||||
{
|
||||
bad_request('this search identifier does not exist');
|
||||
}
|
||||
|
||||
return unserialize($rules_list[0]['rules']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue