Commit graph

121 commits

Author SHA1 Message Date
HWFord
b3151e0129
fixes #2211 integrate new redesign for date posted filter
filter on date_posted custom values (specific years, months or days) along side last 7, 30 days, 3 and 6 months
following redesign by alice
2024-09-04 11:30:44 +02:00
plegall
3bb697c017 [search] bug fixed when a filter intersection is empty 2024-08-20 15:55:00 +02:00
plegall
0cf2a57357 [search] incoherent search results Vs search filters 2024-08-20 14:38:40 +02:00
plegall
dd6d1a91d7 issue #2202 factorize (and use cache) to build filters 2024-08-07 22:15:13 +02:00
plegall
adf45edb2d compatiblity PHP 7 (array_intersect need at least 2 parameters)x 2024-08-06 17:36:17 +02:00
plegall
81bf18cbdb fixes #2202 smarter filters for gallery search
To be able to compute values of filter "added_by" by only taking into account
results of other filters, we need to distinct results filter by filter. So
instead of generating a single complex SQL query, we use one (or maybe more)
SQL query for each filter in action.

First commit for this new way to perform a regular search. To be improved
(many duplication of codes for now)
2024-08-06 17:04:31 +02:00
plegall
8c4b3fb7db fixes #2198 smarter way to deal with filesize bounds 2024-08-02 17:47:45 +02:00
HWFord
6fe1d7db65 fixes #2193 [search] add 5 new widgets
add ratings, ratios, filesize, width and height widgets
- in functions_search add clauses according to each new filter
- in ws_functions add new api parameters
- in index.php add queries to get data for filters
- in admin.lang add missing translations for filters
- in css add basic style to work for modus newspaper
- in js add script for new filters
- in tpl combine script + CSS for double slider & jquery Ui. Add slider conf, template for new widgets

TODO
- adapt css to different themes and skins
2024-07-25 16:11:07 +02:00
plegall
7fae203a83 fixes #2161 in search, do not consider dot character alone as a splitter 2024-05-17 12:28:31 +02:00
plegall
16953317d9 fixes #2146 trim search by words before anything else 2024-04-12 09:50:17 +02:00
plegall
49dadcecb3 fixes #2136 search for matching image_ids instead of tag_ids
Introduce an additional SQL query to find image_ids associated to matching tags instead of using directly the list of matching tags.

Same for matching albums.

Also, change the displayed list of matching tags/albums: do not take into account the OR/AND on the search by word. Do as if the search was always OR.
2024-04-10 17:12:25 +02:00
plegall
a75d4f866a fixes #2112 more characters valid for search by word: ^~#$ 2024-02-07 08:55:12 +01:00
plegall
e59b5282d5 fixes #2096 keep list of search filters in memory 2024-01-24 17:26:51 +01:00
plegall
62835f1804 fixes #2091 search for words, no longer remove _ and - 2024-01-24 13:47:55 +01:00
plegall
13ea43e2ef [search] avoid errors when a filter returns no item 2023-10-28 18:35:20 +02:00
plegall
8aa597cd95 issue #2027 search with contextual values in filters
* valide for all filters, except "album" (for now)
2023-10-22 21:03:53 +02:00
plegall
c904d536a5 fixes #2025 add author field in search by words filter 2023-10-18 18:19:30 +02:00
plegall
426c20d46b fixes #2016 remove search.last_seen, never really used 2023-10-02 14:55:33 +02:00
plegall
b5c9ca4819 issue #2016 save search in history 2023-10-02 12:31:33 +02:00
plegall
eafa700723 search: prevent using search id if the search uuid is available 2023-09-27 19:23:38 +02:00
plegall
fdd2177e78 fixes #2007 no longer possible to update a filteredSearch
* Piwigo will create a new search for any modification in the filters
* we keep the "origin" of the new search with piwigo_search.forked_from field
2023-09-27 16:30:05 +02:00
plegall
61492d092e fixes #2003 search in tags no longer overides global result.
* Piwigo only tries to match tags "within" the search by word block, before combining with other filters
2023-09-25 17:12:12 +02:00
plegall
e0a82909fa fixes #1968 new values for date_posted filter
* add 24h, 3m and yNNNN (year 2023 or 2022...)
* remove 1y
* provide labels from backend instead of managing it in javascript
2023-08-26 12:55:12 +02:00
plegall
52969a7708 issue #1957 albums/tags found now correctly filled 2023-08-17 11:12:56 +02:00
plegall
b787dfd291 issue #1953 improved privacy on searches and associate each search to its creator
* remove temporary functions ws_gallery_getSearch and ws_gallery_updateSearch
* split get_search_array into sub-functions to use them in web API
* use search_uuid as search_id instead of the numeric search.id : better privacy
* only the creator of the search can update it
* if a visitors tries to open the search of another user, it (the search) gets forked into a new search
2023-08-09 19:18:30 +02:00
plegall
87c4fad23e issue #1946 implement backend for search by date_posted 2023-07-24 16:49:53 +02:00
plegall
2d46924bf6 issue #1941 search, implement filter by file type 2023-07-10 15:17:46 +02:00
plegall
c469f5142c fixes #1937 quick search redirects to normal search 2023-07-03 15:22:52 +02:00
plegall
324e0549be fixes #1933 reorganize SQL generated query for search by words on album name/desc 2023-06-29 17:36:17 +02:00
plegall
c01ec38bc4 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
2023-06-22 12:00:43 +02:00
Pierrick Le Gall
60363ecd42
Issue #1869 multi-criteria search (#1927)
* First implementation of the new multi-criteria search. It replaces the old search.php form.
* Displays live search criteria above search results. Each change reloads the list of results (displayed as thumbnails).
* New API method pwg.images.filteredSearch.update called in AJAX to live change the filters.
* New kind of filter: added_by
2023-06-21 16:11:08 +02:00
Thomas Kempf
46954e69d1 some Codestyle changes 2022-07-20 11:29:42 +02:00
Thomas Kempf
7a3d0f2d89 avoid breaking change for other plugins by keeping $search_results 2022-07-20 11:29:42 +02:00
Thomas Kempf
c36ca8712d qsearch_results should change the ids of the result set, otherwise the changed_results will be overwritten by the following code during permission checks 2022-07-20 11:29:42 +02:00
plegall
5bc04d1143 issue #1118 missing code in d0497f0 2021-03-09 11:52:33 +01:00
plegall
d0497f035c fixes #1118 competition between regexp models 2021-03-09 11:32:36 +01:00
plegall
1be34f33a4 fixes #1221 optionnaly include photos from sub-albums of an album matching the search request.
* use configuration setting quick_search_include_sub_albums (default=false) to activate this feature.
* the list of sub-albums is not displayed in the list of album results (to avoid too long lists).
2020-10-30 18:01:10 +01:00
plegall
fc193f7474 issue #830 simplify PHP files header, remove copyright/license info 2019-06-04 17:13:51 +02:00
Akimitsu [Bm]
f2834925bb Fix syntax error 2018-07-12 15:01:32 +02:00
plegall
063711240a Squashed commit of the following:
commit 7190866ccf15033f27095d635546e46dacbb755e
Author: plegall <plg@piwigo.org>
Date:   Thu Jul 12 10:52:33 2018 +0200

    Revert "Replace not maintained cssmin with fork from github https://github.com/natxet/CssMin"

    This reverts commit c8b12a2ed0.

commit 1dac11ecb6783d0d5353c3d250388f018c30fc5c
Author: plegall <plg@piwigo.org>
Date:   Thu Jul 12 10:52:24 2018 +0200

    Revert "Update Smarty to 3.1.3"

    This reverts commit db684f6151.

commit 3ac752dc93912ba5701d22dadd9bb3b81e5bb383
Merge: d1c2e71 8d58256
Author: plegall <plg@piwigo.org>
Date:   Thu Jul 12 10:50:43 2018 +0200

    Merge branch 'php72' of https://github.com/Infern1/Piwigo into Infern1-php72

commit 8d58256c45
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Wed Mar 21 23:40:36 2018 +0100

    new feedcreator version for PHP7

commit bb0fcc3a30
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Wed Mar 21 23:26:27 2018 +0100

    php72 fixes, replaces each() function

commit 3db22c0d33
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Wed Mar 21 23:02:46 2018 +0100

    More fixes for PHP7.2

commit 50d8aafc77
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Mon Mar 19 23:55:21 2018 +0100

    Some more replacements of create_function

commit 8263335c42
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Mon Mar 19 22:54:54 2018 +0100

    Fixed indents

commit 8d58b637c6
Merge: c8b12a2 8a57d77
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Tue Feb 27 13:51:32 2018 +0100

    Merge remote-tracking branch 'upstream/master' into php72

commit c8b12a2ed0
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Thu Jan 18 00:32:46 2018 +0100

    Replace not maintained cssmin with fork from github https://github.com/natxet/CssMin

commit db684f6151
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Thu Jan 18 00:23:24 2018 +0100

    Update Smarty to 3.1.3

commit 6a3f8f3e76
Author: Rob Lensen <rob@bsdfreaks.nl>
Date:   Wed Jan 17 23:40:27 2018 +0100

    Initial work to support PHP 7.2
2018-07-12 10:52:55 +02:00
plegall
028c4ee2d5 fixes #739, make sure keys are reset in the "uniquified" array
... for a regular search, when different set of photos matches the search.
2017-07-25 18:25:36 +02:00
plegall
1d5279e4a8 fixes #647, use the constant instead of hard coded table name 2017-04-04 15:19:24 +02:00
plegall
2ef52d20b5 filter search on albums with permissions 2017-03-30 16:10:18 +02:00
plegall
f0195903c2 typo: fill $qsr->cat_iids and not tag_iids 2017-03-30 16:04:31 +02:00
plegall
c5cd5cd216 issue #343, quick search takes album into account
I basically duplicated qsearch_get_tags as qsearch_get_categories and replaced
"tag" by "cat" + obvious changes like table name to query. I also used the
resulting $qsr->cat_iids for merging with other results.
2017-03-30 15:27:20 +02:00
modus75
828bb42ce3 Fix quick search (in php 0=='' but 0!=='') !!! 2017-01-13 21:22:20 +01:00
modus75
25e2954490 fixes #563 quick search filter, wrong limits on upper range limit 2016-12-09 21:59:34 +01:00
modus75
0a90a68915 fixes #563 quick search filter, wrong limits on upper range limit 2016-12-08 22:14:37 +01:00
plegall
9a93d1f44b fixes #548, escape HTML chars from search expression
before sending them to HTML comment on frontend
2016-11-17 14:10:27 +01:00
plegall
8897e75fc2 feature #355, OR with other "search by word" results
+ use $logger instead of old style "echo" for debugging
2016-02-13 19:31:26 +01:00