RevDelList: Ensure setVisibility always includes itemStatuses in value if applicable

Bug: T387638
Change-Id: Ia01d730be672ec44dda36772cf29e2f11890553c
(cherry picked from commit ecb3175ac1c6b7d080beeb150144214ab61ddba2)
This commit is contained in:
Reedy 2025-03-02 00:02:56 +00:00
parent 332d1dfd83
commit 53ad63aa97

View file

@ -143,6 +143,11 @@ abstract class RevDelList extends RevisionListBase {
$comment = $params['comment'];
$perItemStatus = $params['perItemStatus'] ?? false;
// T387638 - Always ensure ->value['itemStatuses'] is set if requested
if ( $perItemStatus ) {
$status->value['itemStatuses'] = [];
}
// CAS-style checks are done on the _deleted fields so the select
// does not need to use FOR UPDATE nor be in the atomic section
$dbw = $this->lbFactory->getPrimaryDatabase();
@ -167,10 +172,6 @@ abstract class RevDelList extends RevisionListBase {
$idsForLog = [];
$authorActors = [];
if ( $perItemStatus ) {
$status->value['itemStatuses'] = [];
}
// For multi-item deletions, set the old/new bitfields in log_params such that "hid X"
// shows in logs if field X was hidden from ANY item and likewise for "unhid Y". Note the
// form does not let the same field get hidden and unhidden in different items at once.