Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14350506
D13176.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
8 KB
Referenced Files
None
Subscribers
None
D13176.diff
View Options
diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
--- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
+++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
@@ -1111,30 +1111,10 @@
return;
}
- $phids = array();
- foreach ($list->getFields() as $field) {
- $key = $this->getKeyForCustomField($field);
- $value = $saved->getParameter($key);
- $phids[$key] = $field->getRequiredHandlePHIDsForApplicationSearch($value);
- }
- $all_phids = array_mergev($phids);
-
- $handles = array();
- if ($all_phids) {
- $handles = id(new PhabricatorHandleQuery())
- ->setViewer($this->requireViewer())
- ->withPHIDs($all_phids)
- ->execute();
- }
-
foreach ($list->getFields() as $field) {
$key = $this->getKeyForCustomField($field);
$value = $saved->getParameter($key);
- $field->appendToApplicationSearchForm(
- $this,
- $form,
- $value,
- array_select_keys($handles, $phids[$key]));
+ $field->appendToApplicationSearchForm($this, $form, $value);
}
}
diff --git a/src/infrastructure/customfield/field/PhabricatorCustomField.php b/src/infrastructure/customfield/field/PhabricatorCustomField.php
--- a/src/infrastructure/customfield/field/PhabricatorCustomField.php
+++ b/src/infrastructure/customfield/field/PhabricatorCustomField.php
@@ -768,49 +768,28 @@
/**
- * Append search controls to the interface. If you need handles, use
- * @{method:getRequiredHandlePHIDsForApplicationSearch} to get them.
+ * Append search controls to the interface.
*
* @param PhabricatorApplicationSearchEngine Engine constructing the form.
* @param AphrontFormView The form to update.
* @param wild Value from the saved query.
- * @param list<PhabricatorObjectHandle> List of handles.
* @return void
* @task appsearch
*/
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
if ($this->proxy) {
return $this->proxy->appendToApplicationSearchForm(
$engine,
$form,
- $value,
- $handles);
+ $value);
}
throw new PhabricatorCustomFieldImplementationIncompleteException($this);
}
- /**
- * Return a list of PHIDs which @{method:appendToApplicationSearchForm} needs
- * handles for. This is primarily useful if the field stores PHIDs and you
- * need to (for example) render a tokenizer control.
- *
- * @param wild Value from the saved query.
- * @return list<phid> List of PHIDs.
- * @task appsearch
- */
- public function getRequiredHandlePHIDsForApplicationSearch($value) {
- if ($this->proxy) {
- return $this->proxy->getRequiredHandlePHIDsForApplicationSearch($value);
- }
- return array();
- }
-
-
/* -( ApplicationTransactions )-------------------------------------------- */
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomField.php
@@ -282,8 +282,7 @@
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
return;
}
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldBool.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldBool.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldBool.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldBool.php
@@ -65,8 +65,7 @@
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
$form->appendChild(
id(new AphrontFormSelectControl())
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldDate.php
@@ -133,8 +133,7 @@
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
if (!is_array($value)) {
$value = array();
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldInt.php
@@ -62,8 +62,7 @@
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
$form->appendChild(
id(new AphrontFormTextControl())
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldLink.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldLink.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldLink.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldLink.php
@@ -57,8 +57,7 @@
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
$form->appendChild(
id(new AphrontFormTextControl())
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php
@@ -61,13 +61,6 @@
}
}
- public function getRequiredHandlePHIDsForApplicationSearch($value) {
- if ($value) {
- return $value;
- }
- return array();
- }
-
public function getRequiredHandlePHIDsForPropertyView() {
$value = $this->getFieldValue();
if ($value) {
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php
@@ -38,8 +38,7 @@
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
if (!is_array($value)) {
$value = array();
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldText.php
@@ -40,8 +40,7 @@
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
$form->appendChild(
id(new AphrontFormTextControl())
diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldUsers.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldUsers.php
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldUsers.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldUsers.php
@@ -29,8 +29,7 @@
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
- $value,
- array $handles) {
+ $value) {
$control = id(new AphrontFormTokenizerControl())
->setLabel($this->getFieldName())
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 7:01 AM (20 h, 48 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6909773
Default Alt Text
D13176.diff (8 KB)
Attached To
Mode
D13176: Stop threading handles through the CustomField + ApplicationSearch pipeline
Attached
Detach File
Event Timeline
Log In to Comment