Commit graph

64 commits

Author SHA1 Message Date
Alex Cabal
7a3c7ad503 Allow VCS URLs to be null in projects 2024-12-16 21:48:01 -06:00
Alex Cabal
c7a4e34e31 Add projects index page, and more detail on placeholder pages 2024-12-14 21:12:00 -06:00
Alex Cabal
adfe07aad9 Add beginning of a project management system to placeholders 2024-12-14 19:13:03 -06:00
Mike Colagrosso
1ab95df084 Add placeholders for ebooks 2024-12-13 11:46:36 -06:00
Alex Cabal
cf5f488cae Improve error message for people trying to log in to the Patrons Circle 2024-12-13 10:10:52 -06:00
Mike Colagrosso
cae8271ecb Set ReviewerUserId only if Status changed
For non-admin reviewers (i.e., without `CanReviewOwnArtwork`), the `PATCH` form
has a hidden element with the artwork's current `Status`. If the reviewer
updates the `EbookUrl` and not `Status`, then don't record the reviewer's
`ReviewerUserId` because they didn't review or change the `Status`.

Side note: Sending the `PATCH` form an invalid `Status` will result in a
validation error, but that validation error was hard to read because it was the
wrong exception type. This commit adds a new `InvalidArtworkStatusException` to
fix that.

Fixes #433
2024-12-13 09:06:57 -06:00
Alex Cabal
8ad3291a35 Add admin form to view and edit users 2024-11-23 14:30:11 -06:00
Alex Cabal
d4c7703cf0 Restructure how incorrect ebook URLs are redirected 2024-11-11 13:59:45 -06:00
Alex Cabal
acb30b897c Add PropertyFromHttp trait and update codebase to use new pattern 2024-11-10 22:23:43 -06:00
Alex Cabal
be5574eaec Move enums into their own namespace 2024-11-08 16:34:21 -06:00
Alex Cabal
06b82cdaaa Fix broken updated timestamps in OPDS feeds, and fix and add some type hints. 2024-11-08 12:43:47 -06:00
Mike Colagrosso
65d1dcdd88 Use the NOW constant from eec7971 2024-11-04 13:16:56 -06:00
Mike Colagrosso
6bec232d37 Remove checks against EBOOK_EARLIEST_CREATION_DATE 2024-11-04 13:16:56 -06:00
Mike Colagrosso
1076c9a77d Remove primary key EbookSourceId
There is a one to many relationship between `Ebook` and `EbookSource`, and we
don't query by `EbookSourceId`. We add a `SortOrder` column to keep the sources
in the same order as specified in `content.opf`.
2024-11-04 13:16:56 -06:00
Mike Colagrosso
85307a7c7e Standardize trim and other validation of nullable and non-nullable properties 2024-11-04 13:16:56 -06:00
Mike Colagrosso
0eaf2e8e47 Handle nullable and non-nullable validation consistently 2024-11-04 13:16:56 -06:00
Mike Colagrosso
8a61713fa4 Ebook validation: Trim properties that are present 2024-11-04 13:16:56 -06:00
Mike Colagrosso
221c2ff347 Validate Collection name 2024-11-04 13:16:56 -06:00
Mike Colagrosso
2aae231710 EbookTag validation: Trim name and check for empty string 2024-11-04 13:16:56 -06:00
Mike Colagrosso
2273367c6d Collection validation: Pass enum to InvalidCollectionTypeException, not value 2024-11-04 13:16:56 -06:00
Mike Colagrosso
754fc0ab2b LocSubject: Trim Name and validate Name isn't empty 2024-11-04 13:16:56 -06:00
Mike Colagrosso
5b1bb2a9f0 Change tag type from string to enum (TagType) 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
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
63d411a2e6 Initial code changes to insert/update Ebook records 2024-11-04 13:16:56 -06:00
Alex Cabal
44901cf3e2 Add Db::QueryBool() and some code style updates 2024-09-15 13:50:13 -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
a9eab552ab Flesh out some PHPDocs, and consistently name enums 2024-05-14 15:40:56 -05:00
Alex Cabal
ee7c8343dd Convert some constants to enums 2024-05-11 21:51:06 -05:00
Alex Cabal
703e1a7a03 Continue improving type hints 2024-05-10 23:38:57 -05:00
Alex Cabal
c4c8e7353f Enable strict exception type hint checking in PHPStan and add exception type hints 2024-05-10 20:47:36 -05:00
Alex Cabal
50efeb05d1 Style tweaks for getters and add more type hinting 2024-04-30 22:45:20 -05:00
Alex Cabal
e14988ff8c Improve exceptions in DB classes 2024-04-27 14:42:37 -05:00
Alex Cabal
07110829e7 Specify explicit duplicate key exception in DB class 2024-04-26 13:58:05 -05:00
Alex Cabal
7eaa400ae3 Type tweaks for exceptions and some validation 2024-04-25 20:40:49 -05:00
Alex Cabal
225b01f3dd Tweak type hints in ValidationException 2024-04-22 20:18:43 -05:00
Alex Cabal
e55fecaaa2 Switch from DateTime to DateTimeImmutable across codebase 2024-04-13 14:05:14 -05:00
Alex Cabal
2e7b1041bd Add type hint 2024-03-20 13:08:38 -05:00
Alex Cabal
a9dcdcde94 Limit artwork results at the DB level 2024-01-28 14:04:29 -06:00
Alex Cabal
fe03f01393 Some more minor fixes, and checks for the temporary 'todo' tag 2024-01-18 21:31:36 -06:00
Alex Cabal
ca3fc6dbfd Refactor HttpInput::Str and rename some exceptions for consistency 2024-01-18 11:21:05 -06:00
Alex Cabal
2b5f4f55a2 Style tweaks to artworks DB 2024-01-18 10:50:14 -06:00
Alex Cabal
531e3600ea Convert some constants to enums 2024-01-14 22:32:47 -06:00
Alex Cabal
16df5b29fe Validate and normalize museum URLs when submitting artwork 2024-01-12 14:20:54 -06:00
Alex Cabal
e17a4bcc65 Normalize URLs when submitting artwork to database 2024-01-09 13:59:00 -06:00
Alex Cabal
1c3640fab6 More type hinting 2024-01-08 20:21:42 -06:00