Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15380945
D8678.id20573.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D8678.id20573.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 15, 5:06 AM (4 w, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7228529
Default Alt Text
D8678.id20573.diff (2 KB)
Attached To
Mode
D8678: Herald - print out rule monogram rather than rule phid on transcript controller
Attached
Detach File
Event Timeline
Log In to Comment