Album software van pics.hashru.nl
Go to file
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
controllers Replace deprecated strftime calls 2022-05-07 13:25:19 +02:00
models Do not delete thumbnail queue when replacing an asset 2022-07-07 14:22:22 +02:00
public Replace event.keyCode with event.key equivalents. 2021-02-16 15:26:57 +01:00
templates Refactor GenericTable to use PageIndex rather than inherit from it 2021-02-17 20:43:30 +01:00
.gitattributes Initial commit. 2017-11-09 17:00:22 +01:00
.gitignore Initial commit. 2017-11-09 17:00:22 +01:00
app.php Register ErrorHandler before Session start. 2020-03-11 22:38:17 +01:00
composer.json Initial commit. 2017-11-09 17:00:22 +01:00
config.php.dist Fixes the template config for new websites 2018-06-30 17:02:03 +00:00
import_albums.php More hashes to get rid of. 2017-11-09 17:00:34 +01:00
import_postprocess.sh Fix rotation through exiftool after importing. 2017-11-09 17:00:34 +01:00
LICENSE.md Add BSD 3-clause license. 2020-12-30 13:55:30 +01:00
migrate_thumbs.php Backport asynchronous thumbnail generation from Kabuki. 2017-12-20 14:51:23 +01:00
README.md Add a readme file to the repo. 2020-12-30 13:55:16 +01:00
server Process login_url properly. 2017-11-09 17:00:35 +01:00
TODO.md Implement basic tag management. 2017-11-09 17:00:36 +01:00

HashRU Pics

This is the development repository for the HashRU photo website. The CMS and its modules originate in Kabuki CMS, but have been extended and are maintained separately in this repository.

Requirements

The Kabuki codebase requires the following PHP extensions to be enabled for full operation:

  • exif
  • imagick (PECL)
  • mysqli

Setup

Copy config.php.dist to config.php and set-up the constants contained in the file.

Running

For development purposes, simply run the server script provided in the root of this repository. This will start a PHP development server on hashru.local:8080.

For a production environment, please set up a proper PHP-FPM environment instead.

Contributing

Pull requests are welcome over at the HashRU Gitea.

License

The HashRU Pics repository is licensed with a BSD 3-clause license, as is Kabuki CMS.