Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2891889
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php
index 508486b379..bcc08f7ebf 100644
--- a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php
+++ b/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php
@@ -1,52 +1,53 @@
<?php
final class PhabricatorDashboardPanelSearchApplicationCustomField
extends PhabricatorStandardCustomField {
public function getFieldType() {
return 'search.application';
}
public function shouldAppearInApplicationSearch() {
return false;
}
public function renderEditControl(array $handles) {
$engines = id(new PhutilSymbolLoader())
->setAncestorClass('PhabricatorApplicationSearchEngine')
->loadObjects();
+ $engines = mfilter($engines, 'canUseInPanelContext');
$all_apps = id(new PhabricatorApplicationQuery())
->setViewer($this->getViewer())
->withUnlisted(false)
->withInstalled(true)
->execute();
foreach ($engines as $index => $engine) {
if (!isset($all_apps[$engine->getApplicationClassName()])) {
unset($engines[$index]);
continue;
}
}
$options = array();
$value = $this->getFieldValue();
if (strlen($value) && empty($engines[$value])) {
$options[$value] = $value;
}
$engines = msort($engines, 'getResultTypeDescription');
foreach ($engines as $class_name => $engine) {
$options[$class_name] = $engine->getResultTypeDescription();
}
return id(new AphrontFormSelectControl())
->setID($this->getFieldControlID())
->setLabel($this->getFieldName())
->setCaption($this->getCaption())
->setName($this->getFieldKey())
->setValue($this->getFieldValue())
->setOptions($options);
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 15:54 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126213
Default Alt Text
(1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment