Commit graph

497 commits

Author SHA1 Message Date
Mike Colagrosso
44dc65005d Query Contributors table for GetEbooksByAuthor() 2024-11-04 13:16:56 -06:00
Mike Colagrosso
2d5e66f2f2 Get carousel books from the DB 2024-11-04 13:16:56 -06:00
Mike Colagrosso
402dae95ff Add a Type enum to Tags for artwork/ebook 2024-11-04 13:16:56 -06:00
Mike Colagrosso
ee29c526f8 Add a CollectionMembership class 2024-11-04 13:16:56 -06:00
Mike Colagrosso
4d321061c5 Use ::class names instead of strings in LocSubject and EbookTag 2024-11-04 13:16:56 -06:00
Mike Colagrosso
43416e76db Get list of tags from DB 2024-11-04 13:16:56 -06:00
Mike Colagrosso
b3a173aa91 Get ebooks in a collection from DB 2024-11-04 13:16:56 -06:00
Mike Colagrosso
da68637ba0 Get list of collections from DB 2024-11-04 13:16:56 -06:00
Mike Colagrosso
4653b15288 Get ebook from DB for artworks 2024-11-04 13:16:56 -06:00
Mike Colagrosso
252d17340f Fix bug from porting the logic from TitleWithCreditsHtml and ContributorsHtml 2024-11-04 13:16:56 -06:00
Mike Colagrosso
1fd3688621 Use Ebook::GetByIdentifier() to read ebooks 2024-11-04 13:16:56 -06:00
Mike Colagrosso
b176a68d4d Replace TextSinglePageSizeNumber and TextSinglePageSizeUnit with TextSinglePageSizeFormatted 2024-11-04 13:16:56 -06:00
Mike Colagrosso
1589dda35c Correct errors found in #336 2024-11-04 13:16:56 -06:00
Mike Colagrosso
2098b265a8 Rename the constructor Ebook::__construct() to static Ebook::FromFilesystem()
Also added `GetFoo()` methods for all the derived properties like `GetUrl()`, `GetHasDownloads()`, etc. Removed that logic from the constructor so that it's reusable in `Ebook::FromFilesystem()` and `Ebook::GetByIdentifier()`
2024-11-04 13:16:56 -06:00
Mike Colagrosso
f605a4df60 Rename Created and Updated in PHP code to EbookCreated and EbookUpdated to match the schema 2024-11-04 13:16:56 -06:00
Mike Colagrosso
dc62553269 Remove leading slash from exceptions in lib/Exceptions 2024-11-04 13:16:56 -06:00
Mike Colagrosso
5c69923176 Workaround a bug in Safe-PHP causes PHPStan errors 2024-11-04 13:16:56 -06:00
Mike Colagrosso
72d679a04f Fix PHPStan errors 2024-11-04 13:16:56 -06:00
Mike Colagrosso
032032b920 Additional Ebook validation 2024-11-04 13:16:56 -06:00
Mike Colagrosso
3ef1af1237 Add @throws to Ebook::GetByIdentifier 2024-11-04 13:16:56 -06:00
Mike Colagrosso
196f5ae573 Ebook::GetByIdentifier can't return null 2024-11-04 13:16:56 -06:00
Mike Colagrosso
572fd90fed Replace Library::GetEbookByIdentifier with Ebook::GetByIdentifier
The new method throws an exception instead of returning null.
2024-11-04 13:16:56 -06:00
Mike Colagrosso
f736c20e3b Fix error found by PHPStan
PHPStan doesn't think that Identifier can be null:

```
549    Strict comparison using === between string and null will always evaluate to false.
```
2024-11-04 13:16:56 -06:00
Mike Colagrosso
cc8de11ca4 Replace static GetOrCreate with GetByNameOrCreate 2024-11-04 13:16:56 -06:00
Mike Colagrosso
4a1a4efb24 Don't redine Name in LocSubject, already in Tag 2024-11-04 13:16:56 -06:00
Mike Colagrosso
63d411a2e6 Initial code changes to insert/update Ebook records 2024-11-04 13:16:56 -06:00
Alex Cabal
f97539f399 Redirect an artwork if it's found under an artist's alternate name. 2024-11-03 15:15:07 -06:00
Alex Cabal
19cf14c1aa Add automatic donation drives 2024-10-17 11:58:25 -05:00
Alex Cabal
eec79712fc Use a NOW constant instead of new DateTimeImmutable objects, and tweak how some donation drive dates work 2024-10-15 22:21:12 -05:00
Alex Cabal
f6204c1c02 Add KMSK as approved museum in artwork form 2024-09-22 12:49:54 -05:00
Alex Cabal
44901cf3e2 Add Db::QueryBool() and some code style updates 2024-09-15 13:50:13 -05:00
Alex Cabal
854ec6b9df Update framework standards 2024-09-13 12:01:25 -05:00
Alex Cabal
09a91a998e Update framework standards 2024-09-12 21:45:28 -05:00
Mike Colagrosso
ad9bdde32d Use array shapes in PHPDoc for FilterArtwork 2024-07-06 15:02:47 -05:00
Alex Cabal
b5933631c5 Replace some global variables with static class properties in Formatter 2024-07-06 13:34:12 -05:00
Mike Colagrosso
008ffc8ccd Fix PHPStan errors 2024-06-29 15:27:30 -05:00
Alex Cabal
6af2717773 Fix broken Unix timestamp formatting 2024-06-25 10:51:48 -05:00
Alex Cabal
97821d0dc3 Remove last traces of date functions in favor of DateTimeImmutable 2024-06-13 13:11:42 -05:00
Alex Cabal
8bcd52a40a Fix some broken references 2024-06-12 15:21:23 -05:00
Alex Cabal
74627e9421 Update HttpInput to new standards 2024-06-05 16:23:42 -05:00
Alex Cabal
2bfff1f962 Style tweaks 2024-06-03 15:10:18 -05:00
Alex Cabal
a54cca24b6 Add Lenbachhaus as an approved museum 2024-06-03 13:23:30 -05:00
Alex Cabal
c51fe594bf Fix artwork validation logic 2024-06-03 13:14:37 -05:00
Alex Cabal
ad89a4af45 Add type checks 2024-05-30 23:46:50 -05:00
Alex Cabal
06e11c0b45 Update DbConnection to fix error in MultiTableSelect() 2024-05-28 12:40:53 -05:00
Alex Cabal
a2b18bd166 Update DbConnection to return objects in multi select queries 2024-05-26 13:17:05 -05:00
Alex Cabal
fa323842f6 Fix broken check in ValidationException 2024-05-24 23:37:28 -05:00
Alex Cabal
98f45ea4e0 Add the HttpInput::File() and HttpInput::Date() method 2024-05-24 20:48:28 -05:00
Alex Cabal
794e175d47 Add Date type to DbConnection 2024-05-20 20:29:27 -05:00
Alex Cabal
55fb675b70 Add Db::QueryFloat() 2024-05-18 20:43:10 -05:00