mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-28 14:39:36 +01:00
Summary: Ref T13151. See PHI684. Currently, the `MailableFunction` datasource does not include Owners packages, but they are valid subscribers and the `Mailable` datasource includes them. Include them in the `MailableFunction` datasource, too. Test Plan: Searched for revisions with particular package subscribers, got expected results in the UI (tokenizer knew about packages) and response. Reviewers: amckinley, jmeador Reviewed By: jmeador Maniphest Tasks: T13151 Differential Revision: https://secure.phabricator.com/D19476
28 lines
766 B
PHP
28 lines
766 B
PHP
<?php
|
|
|
|
final class PhabricatorSearchSubscribersField
|
|
extends PhabricatorSearchTokenizerField {
|
|
|
|
protected function getDefaultValue() {
|
|
return array();
|
|
}
|
|
|
|
protected function getValueFromRequest(AphrontRequest $request, $key) {
|
|
$allow_types = array(
|
|
PhabricatorProjectProjectPHIDType::TYPECONST,
|
|
PhabricatorOwnersPackagePHIDType::TYPECONST,
|
|
);
|
|
return $this->getUsersFromRequest($request, $key, $allow_types);
|
|
}
|
|
|
|
protected function newDatasource() {
|
|
return new PhabricatorMetaMTAMailableFunctionDatasource();
|
|
}
|
|
|
|
protected function newConduitParameterType() {
|
|
// TODO: Ideally, this should eventually be a "Subscribers" type which
|
|
// accepts projects as well.
|
|
return new ConduitUserListParameterType();
|
|
}
|
|
|
|
}
|