Differential D17634 Diff 42408 src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/xaction/DifferentialRevisionReviewTransaction.php
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | if ($with_authority) { | ||||
$map[$reviewer->getReviewerPHID()] = $status; | $map[$reviewer->getReviewerPHID()] = $status; | ||||
} | } | ||||
} | } | ||||
// In all cases, you affect yourself. | // In all cases, you affect yourself. | ||||
$map[$viewer->getPHID()] = $status; | $map[$viewer->getPHID()] = $status; | ||||
// If the user has submitted a specific list of reviewers to act as (by | // If we're applying an "accept the defaults" transaction, and this | ||||
// unchecking some checkboxes under "Accept"), only affect those reviewers. | // transaction type uses checkboxes, replace the value with the list of | ||||
// defaults. | |||||
if (!is_array($value)) { | |||||
list($options, $default) = $this->getActionOptions($viewer, $revision); | |||||
if ($options) { | |||||
$value = $default; | |||||
} | |||||
} | |||||
// If we have a specific list of reviewers to act on, usually because the | |||||
// user has submitted a specific list of reviewers to act as by | |||||
// unchecking some checkboxes under "Accept", only affect those reviewers. | |||||
if (is_array($value)) { | if (is_array($value)) { | ||||
$map = array_select_keys($map, $value); | $map = array_select_keys($map, $value); | ||||
} | } | ||||
// Convert reviewer statuses into edge data. | // Convert reviewer statuses into edge data. | ||||
foreach ($map as $reviewer_phid => $reviewer_status) { | foreach ($map as $reviewer_phid => $reviewer_status) { | ||||
$map[$reviewer_phid] = array( | $map[$reviewer_phid] = array( | ||||
'data' => array( | 'data' => array( | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |