Commit graph

225 commits

Author SHA1 Message Date
Alex Cabal
806939ca49 Replace Template::Emit...() functions with more generic function 2024-12-18 13:14:16 -06:00
Alex Cabal
28b7384769 Set ebook placeholders to not be in progress when a project is marked as abandoned 2024-12-16 23:54:40 -06:00
Alex Cabal
051e286a6d Continue fleshing out project management system 2024-12-16 15:01:22 -06:00
Alex Cabal
5782d6ca7d Further refine projects system 2024-12-15 23:39:23 -06:00
Alex Cabal
2449de6f6c Also check discussion threads for freshness when marking projects as stalled 2024-12-15 21:59:01 -06:00
Alex Cabal
3b9ea27391 Refactor projects fetching commits from Github 2024-12-15 14:51:53 -06:00
Alex Cabal
9b9d93bc52 Automatically update in progress projects to stalled 2024-12-14 23:54:11 -06:00
Alex Cabal
adfe07aad9 Add beginning of a project management system to placeholders 2024-12-14 19:13:03 -06:00
Alex Cabal
1a742baa51 Add CanEditEbooks benefit and clean up some PHPStan errors 2024-12-14 11:50:16 -06:00
Mike Colagrosso
1ab95df084 Add placeholders for ebooks 2024-12-13 11:46:36 -06:00
Alex Cabal
72615fe79a Fix logic errors 2024-12-06 11:36:11 -06:00
Alex Cabal
9a2b095b70 Allow adjustment of Patrons Circle cost 2024-12-05 14:32:46 -06:00
Alex Cabal
77540dacbb Clarify comments 2024-12-05 11:22:53 -06:00
Alex Cabal
c30d79138a Fix logic in payment process script 2024-12-05 10:46:24 -06:00
Alex Cabal
e11f2ad6b1 Adjust nofollow attribute 2024-11-26 13:41:00 -06:00
Alex Cabal
99f49d7f51 Style tweaks 2024-11-26 11:12:19 -06:00
Alex Cabal
30f2925046 Expand some scripted command arguments 2024-11-25 14:08:14 -06:00
Alex Cabal
90b70b3235 Refactor feed functions out of Library and add some enums 2024-11-15 21:13:35 -06:00
erin
66c44cbdbe Uncomment call to chapter navigation footer script 2024-11-14 17:33:21 -06:00
Alex Cabal
d6a2bdcbc8 Make MARC roles an enum and restructure how contributors are fetched from the DB to reduce queries 2024-11-11 12:01:53 -06:00
Alex Cabal
b7b63a4be5 Refactor functions out of Library 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
be5574eaec Move enums into their own namespace 2024-11-08 16:34:21 -06:00
Alex Cabal
c3c588cc1b Add more type hints and work on some code formatting 2024-11-08 14:20:06 -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
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