- %03u is a minimum width, not a maximum: a series of more than 999 chunks
worked before and is accepted again. With the default chunk size of
500kB, the limit refused any file larger than 488MB.
- fwrite() must write the whole chunk: since the checksum is computed on
the data read, a partial write (disk full) would go unnoticed. fflush()
and fclose() are checked too.
- glob() may return false: no warning in front of the JSON response.
Related to #2583
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vty6FTwtZ3ezEncagFo2FQ
The flock() was taken on the merged file itself. Its lock was released
before the chunks were deleted and before add_uploaded_file() renamed the
file: a request which got the lock just after could truncate the merged
file while it was being moved, or delete it.
The merge now runs under a pwg_unique_exec token per series, kept until
the end of the request (released by a shutdown function, which also runs
after a fatal error such as max_execution_time exceeded). The series is
checked again once the token is obtained, so a request arriving after a
completed merge gives up without touching anything. The token lives in the
database: it also works with several web servers sharing the buffer
directory. Tokens left by a killed request are removed by the housekeeping.
Related to #2583
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vty6FTwtZ3ezEncagFo2FQ
Persons and their association to photos, with an optional face box.
Admin: People page (merge, bulk actions, cover), People tab on the photo edit page (identify a face), access settings in Permissions.
Gallery: faces on the photo page, person page, People filter in the search.
API: pwg.people.* methods, new events for plugins. Core has no AI: source manual, auto or imported is stored for plugins.
only allow rating filter if gallery uses rating
update api, mcs.js and tpl to check if rating
search_filters.inc.php update indentation due to extra if
Added dark mode for unit mode
Templatized filter block for both unit and global mode
Optimized JS functions and added extensibility for unit mode
Modified images.setInfo method so unit mode could save orphan images
Fixed a bug where php would break if filter selection was empty in unit mode
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
* 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
* 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
* Add 3 new files for the tab creation (php, tpl and js)
* Creation of a new API method : pwg.images.formats.remove
* Adding translation in en_GB and fr_FR for the formats
* Minor change on the head-button css class
In order to avoid loading user context as "guest" and then wait to be in ws_images_uploadAsync function to authenticate and load a new user context. This way we deal with "automatic" authentication in the same place (as apache auth or url auth) and we use the more common user context loading mecanism. Making Community compatible is now much easier.
To avoid duplicating too many lines of ws.php into inc/user.inc.php, I have moved the init of ws.php into inc/ws_init.inc.php
* at the end of the upload of after a maximum duration, move the photos from the lounge to their actual categories.
* do not invalidate user cache when photos are added in the lounge, thus avoiding to rebuild cache on every photo uploaded
* the lounge system activates itself only beyond 50k (by default) photo
* for the name of the file in buffer directory, do not use the name given by the user, but the md5 of the name without extension
* function add_uploaded_file deletes uploaded file if not expected