pics/models
Aaron van Geffen c0d69f7205 Do not delete thumbnail queue when replacing an asset
Thumbnails are normally created on demand, e.g. when processing the format codes in a post's body text.
Normally, the temporary URL is only used once to generate thumbnails ad-hoc. However, when cache is
enabled, a reference to the asset may be used in a cached version of a formatted body text, skipping
the normal thumbnail generation routine.

When an asset is replaced, currently, all thumbnails are removed and references to them are removed
from the database. In case the asset is still referenced in a cached formatted body text, this could lead
to an error when requesting the thumbnail, as the thumbnail request is no longer present in the system.

As we do not know what posts use particular assets at this point in the code, it is best to work around this
issue by unsetting the thumbnail filenames rather than deleting the entries outright. This effectively
generates them again on the next request.

In the future, we should aim to keep track of what posts make use of assets, so cache may be invalidated
in a more targeted way.
2022-07-07 14:22:22 +02:00
..
Asset.php Complete date-ordered orderings 2022-11-22 12:00:53 +01:00
AssetIterator.php Backport asynchronous thumbnail generation from Kabuki. 2017-12-20 14:51:23 +01:00
Authentication.php Allow resetting password through email. 2017-11-09 17:00:34 +01:00
Cache.php Initial commit. 2017-11-09 17:00:22 +01:00
Database.php Refactor leftover old-style arrays into new-style arrays. 2019-09-29 14:47:56 +02:00
Dispatcher.php Invoke Dispatcher::kickGuest from Session for invalid sessions. 2020-03-11 22:38:15 +01:00
Email.php Makes the Reply-To header e-mail address configurable. 2018-02-03 20:58:00 +01:00
ErrorHandler.php Allow resetting password through email. 2017-11-09 17:00:34 +01:00
ErrorLog.php Initial commit. 2017-11-09 17:00:22 +01:00
EXIF.php EXIF: prefer DateTimeOriginal over DateTimeDigitized 2022-02-16 21:43:55 +01:00
Form.php Fixes an error related to using continue within a loop. 2019-03-08 19:52:01 +00:00
GenericTable.php Replace deprecated strftime calls 2022-05-07 13:25:19 +02:00
Guest.php Initial commit. 2017-11-09 17:00:22 +01:00
Image.php Do not delete thumbnail queue when replacing an asset 2022-07-07 14:22:22 +02:00
Member.php Fix IPv4-only remnant. 2017-11-09 17:00:35 +01:00
NotAllowedException.php Initial commit. 2017-11-09 17:00:22 +01:00
NotFoundException.php Initial commit. 2017-11-09 17:00:22 +01:00
PageIndex.php Restrict access to GenericTable, Pagination class members. 2021-02-17 20:45:21 +01:00
PhotoMosaic.php Glob portraits for small 4x4 tiles as well. 2017-11-09 17:00:34 +01:00
Registry.php Initial commit. 2017-11-09 17:00:22 +01:00
Session.php Invoke Dispatcher::kickGuest from Session for invalid sessions. 2020-03-11 22:38:15 +01:00
Setting.php Initial commit. 2017-11-09 17:00:22 +01:00
Tag.php Link tags after adding them through autosuggest. 2019-03-09 13:22:32 +01:00
Thumbnail.php Write new thumbnail filenames to parent Image object as well 2022-07-07 13:55:55 +02:00
User.php Initial commit. 2017-11-09 17:00:22 +01:00
UserFacingException.php Allow resetting password through email. 2017-11-09 17:00:34 +01:00