Skip to content

Fix #1576 to allow clearing of pages with [none] user in the last round#1591

Open
bpfoley wants to merge 5 commits into
DistributedProofreaders:masterfrom
bpfoley:clear-round-nouser
Open

Fix #1576 to allow clearing of pages with [none] user in the last round#1591
bpfoley wants to merge 5 commits into
DistributedProofreaders:masterfrom
bpfoley:clear-round-nouser

Conversation

@bpfoley

@bpfoley bpfoley commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

While here, do some assorted code cleanup in page_tally.inc. This is old code and we can take advantage of some new PHP features now.

This can be checked on test on https://www.pgdp.org/~bfoley/c.branch/clear-round-nouser/tools/project_manager/page_detail.php?project=projectID5e2676b51011e. This project contains a lot of pages with [none] as the proofreader.

bpfoley added 4 commits July 1, 2026 00:11
To make page_tallies_add safer, pass a User rather than a username
string to it so there are fewer ways for it to fail (in keeping
with 'parse, don't validate')
As a cleanup, partly for consistency's sake.
This gives us a much shorter implementation, avoids repeating
each property name 6 times, and make it clear that it's just a
DTO (data-transfer object).

Requires PHP 8.1

@cpeel cpeel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice use of the new constructor ability and thanks for the added typing!

Comment thread pinc/page_tally.inc Outdated
Co-authored-by: Casey Peel <cpeel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants