Commit graph

200 commits

Author SHA1 Message Date
Mike Colagrosso
7253ad41ca Rename flag to --ebook-www-filesystem-path 2024-11-04 13:16:56 -06:00
Mike Colagrosso
627f90c0e2 Add try/catch around Ebook::FromFilesystem() 2024-11-04 13:16:56 -06:00
Mike Colagrosso
66021f8d00 Fix mistake when printing a single exception 2024-11-04 13:16:56 -06:00
Mike Colagrosso
d952d63ee9 Add the exception's class name when printing validation exceptions 2024-11-04 13:16:56 -06:00
Mike Colagrosso
ef3eae0da5 Catch ValidationExceptions and print them nicely and remove the findObjectDifferences() function that found differences 2024-11-04 13:16:56 -06:00
Mike Colagrosso
d3b7f5015a Move array definition to the function that uses it 2024-11-04 13:16:56 -06:00
Mike Colagrosso
c8d5dfb11f Add properties that were previously omitted
PHP 8.3 (part of Ubuntu 24.04) outputs a deprecated warning for properties that
were not in the class definition. Error below. There were a few of these
missing from the `Ebook`, `GitCommit`, `CollectionMembership`, `EbookSource`,
and `Contributor` classes. Adding them doesn't change any functionality, but it
does make it clearer what properties a class has.

Some of these properties are never set for `Ebook` instances created from the
filesystem, i.e., `Created` and `Updated`, and some of them need to be manually
set to make `Ebook` instances from the filesystem and the database match, e.g.,
`GitCommitId`, `CollectionEbookId`, `EbookSourceId`, and `ContributorId`.
Making the `Ebook` instances from the filesystem and the database match each
other makes it easier to spot bugs in the future.

Previous errors with PHP 8.3:

```
PHP Deprecated:  Creation of dynamic property Ebook::$Created is deprecated in /standardebooks.org/web/lib/Traits/Accessor.php on line 42
PHP Deprecated:  Creation of dynamic property Ebook::$Updated is deprecated in /standardebooks.org/web/lib/Traits/Accessor.php on line 42
PHP Deprecated:  Creation of dynamic property GitCommit::$GitCommitId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$EbookId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$GitCommitId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$EbookId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$GitCommitId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$EbookId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$GitCommitId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$EbookId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$GitCommitId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property GitCommit::$EbookId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property CollectionMembership::$CollectionEbookId is deprecated in /standardebooks.org/web/lib/Traits/Accessor.php on line 42
PHP Deprecated:  Creation of dynamic property CollectionMembership::$EbookId is deprecated in /standardebooks.org/web/lib/Traits/Accessor.php on line 42
PHP Deprecated:  Creation of dynamic property CollectionMembership::$CollectionId is deprecated in /standardebooks.org/web/lib/Traits/Accessor.php on line 42
PHP Deprecated:  Creation of dynamic property EbookSource::$EbookSourceId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property EbookSource::$EbookId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property EbookSource::$EbookSourceId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property EbookSource::$EbookId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property Contributor::$ContributorId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property Contributor::$EbookId is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
PHP Deprecated:  Creation of dynamic property Contributor::$SortOrder is deprecated in /standardebooks.org/web/lib/DbConnection.php on line 286
```
2024-11-04 13:16:56 -06:00
Mike Colagrosso
e9a8c9f595 Don't call rebuild-cache library from deploy
Should have put this change in #384
2024-11-04 13:16:56 -06:00
Mike Colagrosso
ec26e7f9af Remove Library::RebuildCache 2024-11-04 13:16:56 -06:00
Mike Colagrosso
f4a19a2d12 Replace GetEbooksFromFilesystem with a DB implementation 2024-11-04 13:16:56 -06:00
Mike Colagrosso
ab95722f1e Replace Collections with CollectionMemberships missed in #374 2024-11-04 13:16:56 -06:00
Mike Colagrosso
d5748d1006 update-ebook-database: Keys aren't always integers 2024-11-04 13:16:56 -06:00
Mike Colagrosso
4e7f6cfc88 Adds a validator in ./scripts/update-ebook-db to compare
It compares objects from `Ebook::FromFilesystem()` and `Ebook::GetByIdentifier()` to confirm there are no differences.
2024-11-04 13:16:56 -06:00
Mike Colagrosso
fc4a509b0d Don't call update-ebook-database with verbose flag
`./scripts/update-ebook-database --verbose` should be for low-level debugging only
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
1e0d591066 Set ebookWwwFilesystemPath default to null 2024-11-04 13:16:56 -06:00
Mike Colagrosso
8599dfcc09 Show both long and short flag options 2024-11-04 13:16:56 -06:00
Mike Colagrosso
254bf8b3d7 Put shell variable in quotes 2024-11-04 13:16:56 -06:00
Mike Colagrosso
ccd73c7cb4 Initial script to insert/update Ebook records 2024-11-04 13:16:56 -06: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
2246becb59 Better support for soft credit donors from funds 2024-09-18 19:12:35 -05:00
Alex Cabal
8b02a0ab39 Remove commas from payment values when processing payments 2024-09-18 11:45:46 -05:00
Alex Cabal
44901cf3e2 Add Db::QueryBool() and some code style updates 2024-09-15 13:50:13 -05:00
Alex Cabal
8bcd52a40a Fix some broken references 2024-06-12 15:21:23 -05:00
Alex Cabal
ad89a4af45 Add type checks 2024-05-30 23:46:50 -05:00
Alex Cabal
84bce1c17a Fix incorrect reference in patron property 2024-05-30 23:27:16 -05:00
Anthony J. Bentley
7008b47394 When creating bare repos, clone with --mirror instead of --bare 2024-05-30 22:34:23 -05:00
Anthony J. Bentley
569d8a0e61 Fix whitespace 2024-05-30 22:34:23 -05:00
Alex Cabal
3215e8edcf Fix broken enum 2024-05-17 22:05:41 -05:00
Alex Cabal
acb6b2949f Use static class names instead of strings when getting objects from the DB 2024-05-13 14:49:28 -05:00
Alex Cabal
a442f92e28 Use exists() for some SQL statements; send thank-you email to patron donors who donate again 2024-05-13 12:32:07 -05:00
Alex Cabal
ee7c8343dd Convert some constants to enums 2024-05-11 21:51:06 -05:00
Alex Cabal
e55fecaaa2 Switch from DateTime to DateTimeImmutable across codebase 2024-04-13 14:05:14 -05:00
Alex Cabal
36adb85067 Add ingest-fa-payments script 2024-01-15 15:49:16 -06:00
Alex Cabal
4126db9c3e Remove references to unused script 2024-01-15 12:59:53 -06:00
Alex Cabal
531e3600ea Convert some constants to enums 2024-01-14 22:32:47 -06:00
Alex Cabal
5a1c05d8c5 Add password login option for some users, and further refinements to artwork management system 2024-01-06 22:27:38 -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 Sweet
b2777ee648 Add check for rsvg-convert 2024-01-01 20:21:37 -06:00
Alex Cabal
637b245bcd Make chapter navigation footer script executable 2023-12-23 10:50:18 -06:00
erin
776d42b565 Reorder imports in navigation footer script 2023-12-22 21:28:53 -06:00
erin
40b3ed1340 Update variable names in navigation footer script 2023-12-22 21:28:53 -06:00
erin
c6da28f878 Remove extension from navigation footer links 2023-12-22 21:28:53 -06:00
erin
c62ab2354f Correct code style in navigation footer script 2023-12-22 21:28:53 -06:00
erin
fcda045958 Update navigation footer script in Python 2023-12-22 21:28:53 -06:00
Alex Cabal
0f324efed1 Update payment process script to work with new FA HTML 2023-09-10 21:28:17 -05:00
Alex Cabal
ed4cdcae57 Add rel="prev/next" to navigation footers in ebook text 2023-08-28 10:22:11 -05:00
Alex Cabal
031aa0f4df Tweak Patrons Circle renewal emails 2023-08-02 10:33:06 -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
2dd89c310f Add unprocessed pending payments watchdog 2023-05-15 12:38:01 -05:00