Commit graph

2289 commits

Author SHA1 Message Date
Weijia Cheng
682f23a1f3 Update step-by-step guide to account for project manager role 2025-03-01 13:47:43 -06:00
Alex Cabal
a019d5e87c Enable some additional PHPStan rules and fix some type issues 2025-03-01 13:39:57 -06:00
Alex Cabal
c9e5026cf4 Add logic for accepting payments from soft credits marked as 'anonymous' 2025-02-28 11:43:39 -06:00
Alex Cabal
7b278da43a Fix broken getter 2025-02-28 11:20:28 -06:00
Alex Cabal
11e5770413 Update Composer dependencies, clean up PHPStan config file, and remove Constants.php from Composer in favor of PHPStan configuration 2025-02-28 10:52:16 -06:00
Alex Cabal
c203de4c6b Set in progress bit when saving ebook placeholder 2025-02-27 23:06:12 -06:00
Alex Cabal
7f5ffb4aea Use shorthand assignment for basic getters 2025-02-27 16:03:26 -06:00
Alex Cabal
99b5fd66f2 More type fixes 2025-02-26 15:17:08 -06:00
Alex Cabal
a5a19f947f More type fixes 2025-02-26 14:32:04 -06:00
Alex Cabal
94d674ef96 Tweak test secrets file 2025-02-26 14:28:01 -06:00
Mike Colagrosso
1eeab11353 Add default values for config vars 2025-02-26 14:17:11 -06:00
Alex Cabal
b6079dbf74 Show reviewer and manager when a new project is created 2025-02-26 08:43:20 -06:00
Alex Cabal
9d1b66d19e Update PHPStan and Safe PHP, and review codebase for further type correctness 2025-02-25 22:41:18 -06:00
Alex Cabal
e2e14a3551 Remove DbConnection class in favor of fully-static and typed Db class 2025-02-25 16:47:25 -06:00
Alex Cabal
0a684facee Simplify exceptions in HttpInput 2025-02-24 14:46:42 -06:00
Alex Cabal
3ff13397f0 Handle case when a fetchin commits from a GitHub repo that has no commits 2025-02-24 11:56:36 -06:00
Bex Edmondson
a0ea3949ac Adding missing </p> closing tag in common-issues-when-working-on-public-domain-ebooks.php 2025-02-22 12:46:04 -06:00
Alex Cabal
e0ebb58934 Remove list of museums from 'how-to' page 2025-02-17 14:17:56 -06:00
Alex Cabal
4746b9b18f Add Richard Connell spreadsheet to list 2025-02-15 12:00:34 -06:00
Alex Cabal
831c1531d8 Minor refactor 2025-02-15 11:44:18 -06:00
Alex Cabal
388dbab1f1 Change indexable properties to private class properties instead of public getters/setters 2025-02-13 22:52:12 -06:00
Mike Colagrosso
d05f0ea3c7 Remove blank line 2025-02-13 13:48:39 -06:00
Mike Colagrosso
804b786065 Keep IndexableText null if it's an empty string
The `Validate()` method is correctly setting it to null, but then the
`UPDATE` SQL statement is triggering another call to
`GetIndexableText()`. Without this change, empty strings are being
written to the `IndexableText` column.
2025-02-13 13:48:39 -06:00
Mike Colagrosso
55e0428006 Add a Default EbookSortType
This allows the user to run a keyword search and then change the sort
order. `Default` is interpreted as `Relevance` if a query is present,
`Newest` if not.
2025-02-13 13:48:39 -06:00
Mike Colagrosso
a3ce3f1ec1 Make IndexableText optional
Placeholders do not have FullTitle, AlternateTitle, Tags, LocSubjects,
or TocEntries.
2025-02-13 13:48:39 -06:00
Mike Colagrosso
1629d3a1a1 Remove RelevanceScore from the SELECT fields
Having it in the SELECT fields was causing warnings like this:

```
NOTICE: PHP message: PHP Deprecated:  Creation of dynamic property Ebook::$RelevanceScore is deprecated in /standardebooks.org/web/lib/Traits/Accessor.php
```
2025-02-13 13:48:39 -06:00
Mike Colagrosso
61bbf8f071 Add idxSearchCombined to match multiple fields
The data in these fields are separate:

* `IndexableText`
* `Title`
* `IndexableAuthors`
* `IndexableCollections`

There are also on indices on each of these fields so that they can have
separate weight in the relevance scoring.
2025-02-13 13:48:39 -06:00
Mike Colagrosso
fd3abb568c Remove title, authors, and collections from IndexableText
Those properties are indexed separately. `FullTitle` and
`AlternateTitle` are still indexed here.
2025-02-13 13:48:39 -06:00
Mike Colagrosso
660f8b5e3e RelevanceScore not relevance_score 2025-02-13 13:48:39 -06:00
Mike Colagrosso
0c87f1f262 Remove unnecessary check ?? '' from non-null 2025-02-13 13:48:39 -06:00
Mike Colagrosso
fce4fbc601 Delete non-alphanumerics from query, don't replace with space 2025-02-13 13:48:39 -06:00
Mike Colagrosso
5e10d3be6f Remove placeholder text from search box 2025-02-13 13:48:39 -06:00
Mike Colagrosso
1a71913794 Add a Relevance sort order and improve search
Here's what's in `IndexableText` right now:

1. Title
2. Collections
3. Authors
4. Tags
5. LocSubjects
6. TocEntries

Here is the proposed new ranking:

```
10 * Title +
8 * Authors +
3 * Collections +
IndexableText
```

New indices for existing DBs:

```
ALTER TABLE `Ebooks` ADD COLUMN `IndexableAuthors` text NOT NULL;
ALTER TABLE `Ebooks` ADD COLUMN `IndexableCollections` text NULL;
ALTER TABLE `Ebooks` ADD FULLTEXT `indexSearchTitle` (`Title`);
ALTER TABLE `Ebooks` ADD FULLTEXT `idxSearchAuthors` (`IndexableAuthors`);
ALTER TABLE `Ebooks` ADD FULLTEXT `idxSearchCollections` (`IndexableCollections`);
```
2025-02-13 13:48:39 -06:00
Alex Cabal
b2df8a7018 Type fixes 2025-02-08 12:33:13 -06:00
Alex Cabal
0c2dce3f63 Handle TIFF files with multiple pages 2025-02-08 12:33:13 -06:00
Alex Cabal
5e23837d17 Add blog post 2025-02-04 11:59:46 -06:00
Alex Cabal
367da8ec82 Show author names by compilations in projects view 2025-02-03 22:08:40 -06:00
Alex Cabal
932ce2b2b1 Add ebook redirect 2025-02-03 15:42:06 -06:00
Alex Cabal
664c51ea79 Fix dates in Atom entries 2025-02-03 11:14:05 -06:00
Alex Cabal
2d108211e1 Remove item from uncategorize artwork list 2025-02-01 20:58:13 -06:00
Alex Cabal
94e7937987 Fix typo in reviewer URL 2025-01-30 12:46:03 -06:00
Alex Cabal
6261eee67f Correctly pull reviewer of active projects 2025-01-30 12:44:57 -06:00
Alex Cabal
d942f4642b In projects, update discussion URLs that have discussion too recent to have a full timestamp 2025-01-29 18:46:02 -06:00
Alex Cabal
4f4e72564a Fix permissions logic when patching projects 2025-01-28 15:30:42 -06:00
Alex Cabal
0b461d7ede Refactor some function in Project 2025-01-28 10:29:08 -06:00
Alex Cabal
6378d687d8 Add 'awaiting review' and 'reviewed' project statuses that update from GitHub; allow project owners to update their project statuses 2025-01-27 15:52:21 -06:00
Alex Cabal
b48f3a5798 Improve honeypot link 2025-01-27 10:49:44 -06:00
Alex Cabal
4eb45bd54b Tweak feed wording 2025-01-26 16:23:15 -06:00
Weijia Cheng
a15ae6f77e Fix title of blog post 2025-01-26 16:12:04 -06:00
Alex Cabal
c1e8e83cfb Block some leechers in Apache config 2025-01-25 14:13:49 -06:00