Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php
index 3dd21eea1a..4fb987a40f 100644
--- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php
+++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldSelect.php
@@ -1,79 +1,80 @@
<?php
final class PhabricatorStandardCustomFieldSelect
extends PhabricatorStandardCustomField {
public function getFieldType() {
return 'select';
}
public function buildFieldIndexes() {
$indexes = array();
$value = $this->getFieldValue();
if (strlen($value)) {
$indexes[] = $this->newStringIndex($value);
}
return $indexes;
}
public function readApplicationSearchValueFromRequest(
PhabricatorApplicationSearchEngine $engine,
AphrontRequest $request) {
return $request->getArr($this->getFieldKey());
}
public function applyApplicationSearchConstraintToQuery(
PhabricatorApplicationSearchEngine $engine,
PhabricatorCursorPagedPolicyAwareQuery $query,
$value) {
if ($value) {
$query->withApplicationSearchContainsConstraint(
$this->newStringIndex(null),
$value);
}
}
public function appendToApplicationSearchForm(
PhabricatorApplicationSearchEngine $engine,
AphrontFormView $form,
$value,
array $handles) {
if (!is_array($value)) {
$value = array();
}
$value = array_fuse($value);
$control = id(new AphrontFormCheckboxControl())
->setLabel($this->getFieldName());
foreach ($this->getOptions() as $name => $option) {
$control->addCheckbox(
$this->getFieldKey().'[]',
$name,
$option,
isset($value[$name]));
}
$form->appendChild($control);
}
private function getOptions() {
return $this->getFieldConfigValue('options', array());
}
public function renderEditControl() {
return id(new AphrontFormSelectControl())
->setLabel($this->getFieldName())
->setCaption($this->getCaption())
->setName($this->getFieldKey())
+ ->setValue($this->getFieldValue())
->setOptions($this->getOptions());
}
public function renderPropertyViewValue() {
return idx($this->getOptions(), $this->getFieldValue());
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Nov 16, 1:45 AM (1 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
338659
Default Alt Text
(2 KB)

Event Timeline