Differential D15918 Diff 38334 src/applications/differential/editor/DifferentialTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/editor/DifferentialTransactionEditor.php
Show First 20 Lines • Show All 1,504 Lines • ▼ Show 20 Lines | foreach ($packages as $key => $package) { | ||||
unset($packages[$key]); | unset($packages[$key]); | ||||
} | } | ||||
} | } | ||||
if (!$packages) { | if (!$packages) { | ||||
return array(); | return array(); | ||||
} | } | ||||
// Remove packages that the revision author is an owner of. If you own | |||||
// code, you don't need another owner to review it. | |||||
$authority = id(new PhabricatorOwnersPackageQuery()) | |||||
->setViewer(PhabricatorUser::getOmnipotentUser()) | |||||
->withPHIDs(mpull($packages, 'getPHID')) | |||||
->withAuthorityPHIDs(array($object->getAuthorPHID())) | |||||
->execute(); | |||||
$authority = mpull($authority, null, 'getPHID'); | |||||
foreach ($packages as $key => $package) { | |||||
$package_phid = $package->getPHID(); | |||||
if ($authority[$package_phid]) { | |||||
unset($packages[$key]); | |||||
continue; | |||||
} | |||||
} | |||||
if (!$packages) { | |||||
return array(); | |||||
} | |||||
$auto_subscribe = array(); | $auto_subscribe = array(); | ||||
$auto_review = array(); | $auto_review = array(); | ||||
$auto_block = array(); | $auto_block = array(); | ||||
foreach ($packages as $package) { | foreach ($packages as $package) { | ||||
switch ($package->getAutoReview()) { | switch ($package->getAutoReview()) { | ||||
case PhabricatorOwnersPackage::AUTOREVIEW_SUBSCRIBE: | case PhabricatorOwnersPackage::AUTOREVIEW_SUBSCRIBE: | ||||
$auto_subscribe[] = $package; | $auto_subscribe[] = $package; | ||||
▲ Show 20 Lines • Show All 359 Lines • Show Last 20 Lines |