@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove Differential subscribers field

Summary: Ref T11114. This is obsoleted by `DifferentialSubscribersCommitMessageField` and EditEngine.

Test Plan: Edited a revision's subscribers.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

Differential Revision: https://secure.phabricator.com/D17081

-96
-2
src/__phutil_library_map__.php
··· 565 565 'DifferentialSetDiffPropertyConduitAPIMethod' => 'applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php', 566 566 'DifferentialStoredCustomField' => 'applications/differential/customfield/DifferentialStoredCustomField.php', 567 567 'DifferentialSubscribersCommitMessageField' => 'applications/differential/field/DifferentialSubscribersCommitMessageField.php', 568 - 'DifferentialSubscribersField' => 'applications/differential/customfield/DifferentialSubscribersField.php', 569 568 'DifferentialSummaryCommitMessageField' => 'applications/differential/field/DifferentialSummaryCommitMessageField.php', 570 569 'DifferentialSummaryField' => 'applications/differential/customfield/DifferentialSummaryField.php', 571 570 'DifferentialTagsCommitMessageField' => 'applications/differential/field/DifferentialTagsCommitMessageField.php', ··· 5231 5230 'DifferentialSetDiffPropertyConduitAPIMethod' => 'DifferentialConduitAPIMethod', 5232 5231 'DifferentialStoredCustomField' => 'DifferentialCustomField', 5233 5232 'DifferentialSubscribersCommitMessageField' => 'DifferentialCommitMessageField', 5234 - 'DifferentialSubscribersField' => 'DifferentialCoreCustomField', 5235 5233 'DifferentialSummaryCommitMessageField' => 'DifferentialCommitMessageField', 5236 5234 'DifferentialSummaryField' => 'DifferentialCoreCustomField', 5237 5235 'DifferentialTagsCommitMessageField' => 'DifferentialCommitMessageField',
-1
src/applications/differential/config/PhabricatorDifferentialConfigOptions.php
··· 30 30 new DifferentialTestPlanField(), 31 31 new DifferentialReviewersField(), 32 32 new DifferentialProjectReviewersField(), 33 - new DifferentialSubscribersField(), 34 33 new DifferentialRepositoryField(), 35 34 new DifferentialViewPolicyField(), 36 35
-93
src/applications/differential/customfield/DifferentialSubscribersField.php
··· 1 - <?php 2 - 3 - final class DifferentialSubscribersField 4 - extends DifferentialCoreCustomField { 5 - 6 - public function getFieldKey() { 7 - return 'differential:subscribers'; 8 - } 9 - 10 - public function getFieldKeyForConduit() { 11 - return 'ccPHIDs'; 12 - } 13 - 14 - public function getFieldName() { 15 - return pht('Subscribers'); 16 - } 17 - 18 - public function getFieldDescription() { 19 - return pht('Manage subscribers.'); 20 - } 21 - 22 - protected function readValueFromRevision( 23 - DifferentialRevision $revision) { 24 - if (!$revision->getPHID()) { 25 - return array(); 26 - } 27 - 28 - return PhabricatorSubscribersQuery::loadSubscribersForPHID( 29 - $revision->getPHID()); 30 - } 31 - 32 - public function getNewValueForApplicationTransactions() { 33 - return array('=' => $this->getValue()); 34 - } 35 - 36 - public function readValueFromRequest(AphrontRequest $request) { 37 - $this->setValue($request->getArr($this->getFieldKey())); 38 - } 39 - 40 - public function renderEditControl(array $handles) { 41 - return id(new AphrontFormTokenizerControl()) 42 - ->setUser($this->getViewer()) 43 - ->setName($this->getFieldKey()) 44 - ->setDatasource(new PhabricatorMetaMTAMailableDatasource()) 45 - ->setValue($this->getValue()) 46 - ->setError($this->getFieldError()) 47 - ->setLabel($this->getFieldName()); 48 - } 49 - 50 - public function getApplicationTransactionType() { 51 - return PhabricatorTransactions::TYPE_SUBSCRIBERS; 52 - } 53 - 54 - public function shouldAppearInCommitMessage() { 55 - return true; 56 - } 57 - 58 - public function shouldAllowEditInCommitMessage() { 59 - return true; 60 - } 61 - 62 - public function shouldAppearInCommitMessageTemplate() { 63 - return true; 64 - } 65 - 66 - public function getCommitMessageLabels() { 67 - return array( 68 - 'CC', 69 - 'CCs', 70 - 'Subscriber', 71 - 'Subscribers', 72 - ); 73 - } 74 - 75 - public function parseValueFromCommitMessage($value) { 76 - return $this->parseObjectList( 77 - $value, 78 - array( 79 - PhabricatorPeopleUserPHIDType::TYPECONST, 80 - PhabricatorProjectProjectPHIDType::TYPECONST, 81 - PhabricatorOwnersPackagePHIDType::TYPECONST, 82 - )); 83 - } 84 - 85 - public function getRequiredHandlePHIDsForCommitMessage() { 86 - return $this->getValue(); 87 - } 88 - 89 - public function renderCommitMessageValue(array $handles) { 90 - return $this->renderObjectList($handles); 91 - } 92 - 93 - }