Hold donations with flagged donor names for moderation; reconcile lost side effects (schema v6)
Test and Release / test (push) Successful in 1m28s
Test and Release / release (push) Successful in 7s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
shadowdaoandClaude Sonnet 5.5 committed 2026-11-15 17:07:32 -08:00
1 parent 473fe192cd
commit 353f7ca5be
16 files changed
+681 -41

No files matched your search

+11
View File
@@ -61,4 +61,15 @@ final class Format {
}
return (string) $row['donor_name'];
}
/**
* What is being held for review, from sg_donations.moderation_flags: 'Name', 'Message' or 'Name and message'.
* Rows held before flags existed (empty value) were always held for their message.
*/
public static function flaggedLabel( array $row ): string {
$flags = array_filter( array_map( 'trim', explode( ',', (string) ( $row['moderation_flags'] ?? '' ) ) ) );
$name = in_array( 'name', $flags, true );
$msg = in_array( 'message', $flags, true ) || ! $name;
return $name && $msg ? 'Name and message' : ( $name ? 'Name' : 'Message' );
}
}