Mike Colagrosso
d9b6e3020c
IndexableText improvements
...
Description and LongDescription were adding too many extraneous matches. Maintain
how special characters are handled in search currently.
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
252d17340f
Fix bug from porting the logic from TitleWithCreditsHtml and ContributorsHtml
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
63d411a2e6
Initial code changes to insert/update Ebook records
2024-11-04 13:16:56 -06: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
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
e55fecaaa2
Switch from DateTime to DateTimeImmutable across codebase
2024-04-13 14:05:14 -05:00
Mike Colagrosso
29fc6f9ff2
Update AlternateTitle to parse dcterms:alternate
2024-02-25 15:43:47 -06:00
Alex Cabal
2b47b65437
Clean up function imports
2024-01-31 10:28:22 -06:00
Mike Colagrosso
09b4385100
Convert SOURCE_ constants to an enum
2024-01-30 11:10:05 -06:00
Alex Cabal
ca3fc6dbfd
Refactor HttpInput::Str and rename some exceptions for consistency
2024-01-18 11:21:05 -06:00
Alex Cabal
f7ff76bf7d
Rename some Formatter functions for clarity
2024-01-17 16:04:30 -06:00
Alex Cabal
783c09864f
Add type hints for remaining classes
2024-01-08 16:08:57 -06:00
Mike Colagrosso
6a5c05511a
Add cover art database
...
Co-authored-by: Job Curtis <job.curtis@gmail.com>
Co-authored-by: Alex Cabal <alex@standardebooks.org>
2024-01-03 19:14:04 -06:00
Alex Cabal
65c4578a4e
Handle exception for a possible attack vector
2023-07-20 15:05:24 -05:00
Alex Cabal
bd4b8d8944
Some type check fixes
2023-06-21 11:01:43 -05:00
Alex Cabal
8127f0c7e2
Remove unused exception variables, now that this is possible with PHP8
2023-06-06 21:00:12 -05:00
Alex Cabal
8d8de1e062
Fix reading ease description calculation
2023-03-16 11:40:58 -05:00
Alex Cabal
cee4517517
Suppress PHP warnings that are handled by PHP Safe
2023-01-30 16:37:45 -06:00
Alex Cabal
04759aa17b
Add size warning when single-page download is larger than 1MB
2023-01-13 16:42:57 -06:00
Alex Cabal
c2dabfbe2d
Add comment for clarity
2022-07-27 11:30:56 -05:00
Weijia Cheng
f2ffacdff8
Restrict Internet Archive source to scans only
2022-07-27 11:29:12 -05:00
Alex Cabal
885b8745e7
Default to author name if no file-as found
2022-07-14 12:55:09 -05:00
Alex Cabal
011cd747f1
Convert newsletter to use Users table as base
2022-07-04 12:09:49 -05:00
Alex Cabal
6c8414f844
Update PropertiesBase to new patterns and improve static analysis checks
2022-06-30 13:23:05 -05:00
Alex Cabal
c2cf6ef455
Change 'modified' property to 'updated' for consistency
2022-06-29 18:55:51 -05:00
Alex Cabal
dbefba6b94
Change 'timestamp' properties on objects to more descriptive names
2022-06-29 17:19:28 -05:00
Alex Cabal
3d32bd03b9
Remove unused var declaration
2022-06-26 11:46:17 -05:00
Alex Cabal
70fbce410c
Use the se:is-a-collection metadata element to decide if we search the ToC
2022-06-25 20:09:09 -05:00
Alex Cabal
70a80d0e02
Add system to retrieve and manage donations in a local database
2022-06-20 14:05:27 -05:00
Alex Cabal
6c267497cc
Adjust how tags URLs are calculated to support tags with non-ASCII characters like 'children’s'
2022-06-18 21:17:33 -05:00
Alex Cabal
b0197d189a
Add newsletter management functionality
2022-03-20 17:46:47 -05:00
Alex Cabal
79e17c9b94
Remove OLS from pre-formatted page scan links
2021-09-23 14:19:16 -05:00
Alex Cabal
d714971e06
Further improve RDFa metadata
2021-06-17 18:42:53 -05:00
Alex Cabal
9c76355972
If the illustrator and translator are the same, don't list them as both
2021-06-01 14:14:54 -05:00
Alex Cabal
94a6330576
Add ability to parse se:role epub property
2021-03-23 20:07:44 -05:00