1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-19 05:12:41 +01:00

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
This commit is contained in:
epriestley 2016-12-16 09:17:38 -08:00
parent 3893b5f1a5
commit 84572a3b93
3 changed files with 0 additions and 96 deletions

View file

@ -565,7 +565,6 @@ phutil_register_library_map(array(
'DifferentialSetDiffPropertyConduitAPIMethod' => 'applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php', 'DifferentialSetDiffPropertyConduitAPIMethod' => 'applications/differential/conduit/DifferentialSetDiffPropertyConduitAPIMethod.php',
'DifferentialStoredCustomField' => 'applications/differential/customfield/DifferentialStoredCustomField.php', 'DifferentialStoredCustomField' => 'applications/differential/customfield/DifferentialStoredCustomField.php',
'DifferentialSubscribersCommitMessageField' => 'applications/differential/field/DifferentialSubscribersCommitMessageField.php', 'DifferentialSubscribersCommitMessageField' => 'applications/differential/field/DifferentialSubscribersCommitMessageField.php',
'DifferentialSubscribersField' => 'applications/differential/customfield/DifferentialSubscribersField.php',
'DifferentialSummaryCommitMessageField' => 'applications/differential/field/DifferentialSummaryCommitMessageField.php', 'DifferentialSummaryCommitMessageField' => 'applications/differential/field/DifferentialSummaryCommitMessageField.php',
'DifferentialSummaryField' => 'applications/differential/customfield/DifferentialSummaryField.php', 'DifferentialSummaryField' => 'applications/differential/customfield/DifferentialSummaryField.php',
'DifferentialTagsCommitMessageField' => 'applications/differential/field/DifferentialTagsCommitMessageField.php', 'DifferentialTagsCommitMessageField' => 'applications/differential/field/DifferentialTagsCommitMessageField.php',
@ -5231,7 +5230,6 @@ phutil_register_library_map(array(
'DifferentialSetDiffPropertyConduitAPIMethod' => 'DifferentialConduitAPIMethod', 'DifferentialSetDiffPropertyConduitAPIMethod' => 'DifferentialConduitAPIMethod',
'DifferentialStoredCustomField' => 'DifferentialCustomField', 'DifferentialStoredCustomField' => 'DifferentialCustomField',
'DifferentialSubscribersCommitMessageField' => 'DifferentialCommitMessageField', 'DifferentialSubscribersCommitMessageField' => 'DifferentialCommitMessageField',
'DifferentialSubscribersField' => 'DifferentialCoreCustomField',
'DifferentialSummaryCommitMessageField' => 'DifferentialCommitMessageField', 'DifferentialSummaryCommitMessageField' => 'DifferentialCommitMessageField',
'DifferentialSummaryField' => 'DifferentialCoreCustomField', 'DifferentialSummaryField' => 'DifferentialCoreCustomField',
'DifferentialTagsCommitMessageField' => 'DifferentialCommitMessageField', 'DifferentialTagsCommitMessageField' => 'DifferentialCommitMessageField',

View file

@ -30,7 +30,6 @@ final class PhabricatorDifferentialConfigOptions
new DifferentialTestPlanField(), new DifferentialTestPlanField(),
new DifferentialReviewersField(), new DifferentialReviewersField(),
new DifferentialProjectReviewersField(), new DifferentialProjectReviewersField(),
new DifferentialSubscribersField(),
new DifferentialRepositoryField(), new DifferentialRepositoryField(),
new DifferentialViewPolicyField(), new DifferentialViewPolicyField(),

View file

@ -1,93 +0,0 @@
<?php
final class DifferentialSubscribersField
extends DifferentialCoreCustomField {
public function getFieldKey() {
return 'differential:subscribers';
}
public function getFieldKeyForConduit() {
return 'ccPHIDs';
}
public function getFieldName() {
return pht('Subscribers');
}
public function getFieldDescription() {
return pht('Manage subscribers.');
}
protected function readValueFromRevision(
DifferentialRevision $revision) {
if (!$revision->getPHID()) {
return array();
}
return PhabricatorSubscribersQuery::loadSubscribersForPHID(
$revision->getPHID());
}
public function getNewValueForApplicationTransactions() {
return array('=' => $this->getValue());
}
public function readValueFromRequest(AphrontRequest $request) {
$this->setValue($request->getArr($this->getFieldKey()));
}
public function renderEditControl(array $handles) {
return id(new AphrontFormTokenizerControl())
->setUser($this->getViewer())
->setName($this->getFieldKey())
->setDatasource(new PhabricatorMetaMTAMailableDatasource())
->setValue($this->getValue())
->setError($this->getFieldError())
->setLabel($this->getFieldName());
}
public function getApplicationTransactionType() {
return PhabricatorTransactions::TYPE_SUBSCRIBERS;
}
public function shouldAppearInCommitMessage() {
return true;
}
public function shouldAllowEditInCommitMessage() {
return true;
}
public function shouldAppearInCommitMessageTemplate() {
return true;
}
public function getCommitMessageLabels() {
return array(
'CC',
'CCs',
'Subscriber',
'Subscribers',
);
}
public function parseValueFromCommitMessage($value) {
return $this->parseObjectList(
$value,
array(
PhabricatorPeopleUserPHIDType::TYPECONST,
PhabricatorProjectProjectPHIDType::TYPECONST,
PhabricatorOwnersPackagePHIDType::TYPECONST,
));
}
public function getRequiredHandlePHIDsForCommitMessage() {
return $this->getValue();
}
public function renderCommitMessageValue(array $handles) {
return $this->renderObjectList($handles);
}
}