Page MenuHomePhabricator

D8678.id20572.diff
No OneTemporary

D8678.id20572.diff

diff --git a/src/applications/herald/controller/HeraldTranscriptController.php b/src/applications/herald/controller/HeraldTranscriptController.php
--- a/src/applications/herald/controller/HeraldTranscriptController.php
+++ b/src/applications/herald/controller/HeraldTranscriptController.php
@@ -112,7 +112,15 @@
}
protected function renderConditionTestValue($condition, $handles) {
- $value = $condition->getTestValue();
+ switch ($condition->getFieldName()) {
+ case HeraldAdapter::FIELD_RULE:
+ $value = array($condition->getTestValue());
+ break;
+ default:
+ $value = $condition->getTestValue();
+ break;
+ }
+
if (!is_scalar($value) && $value !== null) {
foreach ($value as $key => $phid) {
$handle = idx($handles, $phid);
@@ -191,16 +199,23 @@
$condition_xscripts);
}
foreach ($condition_xscripts as $condition_xscript) {
- $value = $condition_xscript->getTestValue();
- // TODO: Also total hacks.
- if (is_array($value)) {
- foreach ($value as $phid) {
- if ($phid) { // TODO: Probably need to make sure this "looks like" a
- // PHID or decrease the level of hacks here; this used
- // to be an is_numeric() check in Facebook land.
- $phids[] = $phid;
+ switch ($condition_xscript->getFieldName()) {
+ case HeraldAdapter::FIELD_RULE:
+ $phids[] = $condition_xscript->getTestValue();
+ break;
+ default:
+ $value = $condition_xscript->getTestValue();
+ // TODO: Also total hacks.
+ if (is_array($value)) {
+ foreach ($value as $phid) {
+ if ($phid) { // TODO: Probably need to make sure this
+ // "looks like" a PHID or decrease the level of hacks here;
+ // this used to be an is_numeric() check in Facebook land.
+ $phids[] = $phid;
+ }
+ }
}
- }
+ break;
}
}

File Metadata

Mime Type
text/plain
Expires
May 21 2024, 8:05 PM (5 w, 12 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6286957
Default Alt Text
D8678.id20572.diff (2 KB)

Event Timeline