4 Commits

Author SHA1 Message Date
Brad Dutton
3ee59350a1 php 8.1 updates 2022-01-08 20:33:23 -08:00
shadlaws
f83ed5f871 #1982 - Add placeholder for albums with no album cover.
- Added missing_album_cover.jpg placeholder image.
- Modified the graphics helper to use it.  Calling graphics::generate will copy it.
- Modified item::remove_album_cover and gallery_event::item_created to run graphics::generate.
- Added unit test to Graphics_Helper_Test.
2013-01-31 17:18:39 +01:00
shadlaws
cf07742595 #1968 - Improve album cover generation/removal/etc.
- Added stanza to Item_Model::save that handles when cover id is null.
- Added logic to graphics::generate to copy/convert album cover thumbs from their item thumbs to ensure they're always jpg, and eliminate the possibility that we copy/convert a dirty thumb.
- Redirected other places in code where we want to do one of the above two things to use these two functions instead (gallery_event::item_updated_data_file, item::make_album_cover, item::remove_album_cover).
- Improved validation in Item_Model so only albums can have covers and all covers must be non-albums.
- Added unit tests to Graphics_Helper_Test.
2013-01-30 01:07:36 +01:00
shadlaws
536bdaa4db #1967 - Improve how graphics::generate handles missing/bad images.
- Made missing_photo match the image format (jpg, png, etc.).
- Swapped missing_photo.png for missing_photo.jpg since it's likely to require less conversion to match.
- Improved error messages to user when things go wrong.
- Ensured that missing image placeholders are always copied when there's an error.
- Ensured we don't mistake no file output for a correct file output (delete target before attempt).
- Restructured graphics::generate a bit to work better with above changes.
- Added unit tests for graphics::generate.
2013-01-29 18:35:10 +01:00