Page MenuHomePhabricator

D18142.diff
No OneTemporary

D18142.diff

diff --git a/src/applications/transactions/editfield/PhabricatorSelectEditField.php b/src/applications/transactions/editfield/PhabricatorSelectEditField.php
--- a/src/applications/transactions/editfield/PhabricatorSelectEditField.php
+++ b/src/applications/transactions/editfield/PhabricatorSelectEditField.php
@@ -27,18 +27,13 @@
return $this->optionAliases;
}
+ protected function getDefaultValueFromConfiguration($value) {
+ return $this->getCanonicalValue($value);
+ }
+
protected function getValueForControl() {
$value = parent::getValueForControl();
-
- $options = $this->getOptions();
- if (!isset($options[$value])) {
- $aliases = $this->getOptionAliases();
- if (isset($aliases[$value])) {
- $value = $aliases[$value];
- }
- }
-
- return $value;
+ return $this->getCanonicalValue($value);
}
protected function newControl() {
@@ -59,4 +54,16 @@
return new ConduitStringParameterType();
}
+ private function getCanonicalValue($value) {
+ $options = $this->getOptions();
+ if (!isset($options[$value])) {
+ $aliases = $this->getOptionAliases();
+ if (isset($aliases[$value])) {
+ $value = $aliases[$value];
+ }
+ }
+
+ return $value;
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 22, 2:36 PM (5 h, 24 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6918579
Default Alt Text
D18142.diff (1 KB)

Event Timeline