Page MenuHomePhorge

No OneTemporary

diff --git a/src/applications/search/field/PhabricatorSearchCheckboxesField.php b/src/applications/search/field/PhabricatorSearchCheckboxesField.php
index 5a552362bf..e1a72f4576 100644
--- a/src/applications/search/field/PhabricatorSearchCheckboxesField.php
+++ b/src/applications/search/field/PhabricatorSearchCheckboxesField.php
@@ -1,44 +1,52 @@
<?php
final class PhabricatorSearchCheckboxesField
extends PhabricatorSearchField {
private $options;
public function setOptions(array $options) {
$this->options = $options;
return $this;
}
public function getOptions() {
return $this->options;
}
protected function getDefaultValue() {
return array();
}
+ protected function didReadValueFromSavedQuery($value) {
+ if (!is_array($value)) {
+ return array();
+ }
+
+ return $value;
+ }
+
protected function getValueFromRequest(AphrontRequest $request, $key) {
return $this->getListFromRequest($request, $key);
}
protected function newControl() {
$value = array_fuse($this->getValue());
$control = new AphrontFormCheckboxControl();
foreach ($this->getOptions() as $key => $option) {
$control->addCheckbox(
$this->getKey().'[]',
$key,
$option,
isset($value[$key]));
}
return $control;
}
protected function newConduitParameterType() {
return new ConduitStringListParameterType();
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 19, 16:20 (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126423
Default Alt Text
(1 KB)

Event Timeline