Alex Cabal
84f4b2b0bf
Add donation drive aside to download page
2024-11-25 12:03:26 -06:00
Alex Cabal
11d9d0f44a
Tweak a session variable name and update comments
2024-11-20 16:42:24 -06:00
Alex Cabal
3050ab7219
Use HTTP code enums instead of ints
2024-11-20 14:52:05 -06:00
Alex Cabal
8546039b97
Comment formatting
2024-11-15 21:40:56 -06:00
Alex Cabal
d4c7703cf0
Restructure how incorrect ebook URLs are redirected
2024-11-11 13:59:45 -06:00
Alex Cabal
ec0b81817d
Restructure some files to match new URL structure
2024-11-11 11:17:04 -06:00
Alex Cabal
b7b63a4be5
Refactor functions out of Library
2024-11-10 23:05:31 -06:00
Alex Cabal
1449148989
Switch logged in user to static typed variable instead of in $GLOBALS
2024-11-10 23:05:31 -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
c35c47b793
Add DateTimeFormat enum
2024-11-08 16:41:15 -06:00
Alex Cabal
be5574eaec
Move enums into their own namespace
2024-11-08 16:34:21 -06:00
Alex Cabal
d03d9782d1
Fixes for PD Day placeholder ebooks
2024-11-07 20:15:20 -06:00
Alex Cabal
8f17f39e1b
Clean up some PD day code
2024-11-05 16:01:44 -06:00
Alex Cabal
163ada3b09
Add placeholders for public domain day ebooks
2024-11-04 21:17:09 -06:00
Alex Cabal
60f0ea16cb
Formatting tweaks
2024-11-04 13:31:17 -06:00
Mike Colagrosso
9a4da8f961
Fix PHPStan errors for CollectionType enum
...
Use the `value` property of PHP enums to get the underlying string for functions that expect a string.
Followup to #392
2024-11-04 13:16:56 -06:00
Mike Colagrosso
6c8e819316
Implement OpenSearch feed search with FilterEbooks
2024-11-04 13:16:56 -06:00
Mike Colagrosso
807e8410b4
Use array shapes in the PHPDoc
...
This makes the extra documentation unnecessary
2024-11-04 13:16:56 -06:00
Mike Colagrosso
989dcab9f0
Implement FilterEbooks via DB
2024-11-04 13:16:56 -06:00
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
ee29c526f8
Add a CollectionMembership class
2024-11-04 13:16:56 -06:00
Mike Colagrosso
c85db527cf
Get ebook from DB for downloads
2024-11-04 13:16:56 -06:00
Mike Colagrosso
415faeb19d
Remove unused import that should have been in #371
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
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
41b130195f
Change size checks (like bigger than 3 MB) to use TextSinglePageByteCount, not number and units
2024-11-04 13:16:56 -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
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
Robin Whittleton
60300807f4
Speed up reading of “More books” links
...
The links are fine on their own, don’t need to be announced as the covers.
2024-05-30 21:35:12 -05:00
Alex Cabal
a9eab552ab
Flesh out some PHPDocs, and consistently name enums
2024-05-14 15:40:56 -05:00
Alex Cabal
70ae877dd8
Bump PHPStan check level to max and add final round of type hints
2024-05-13 10:48:05 -05:00
Alex Cabal
110c091a7b
Define some constants to make HTTP input code less wordy
2024-05-12 12:29:30 -05:00
Alex Cabal
ee7c8343dd
Convert some constants to enums
2024-05-11 21:51:06 -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
8cc661015c
Add enum for view type and fix some type hints
2024-05-08 11:22:28 -05:00
Alex Cabal
7c8463d297
Add <link rel="canonical"> to some pages
2024-05-08 11:01:18 -05:00
Alex Cabal
e55fecaaa2
Switch from DateTime to DateTimeImmutable across codebase
2024-04-13 14:05:14 -05:00
Alex Cabal
835ea7c767
Add note explaining Kindle epub 'support' to download page
2024-03-19 13:48:16 -05:00
Alex Cabal
7cf3148536
Add safe function
2024-03-16 13:39:36 -05:00
Alex Cabal
bb80fb206d
Remove dead code path
2024-03-16 13:39:03 -05:00
Alex Cabal
1adc1dfe1e
Add @nofollow attribute to ebook download links to prevent crawlers
2024-03-12 11:36:09 -05:00
Alex Cabal
ff8cc6554d
Catch exception in download script
2024-02-28 09:04:05 -06:00
Alex Cabal
9437beaee9
Add thank-you page to ebook downloads
2024-02-26 13:34:44 -06:00
Mike Colagrosso
0ed064c8f0
Move single collection view to collections/get.php
2024-02-05 13:51:51 -06:00