Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14407604
D17063.id41051.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17063.id41051.diff
View Options
diff --git a/src/applications/transactions/storage/PhabricatorModularTransactionType.php b/src/applications/transactions/storage/PhabricatorModularTransactionType.php
--- a/src/applications/transactions/storage/PhabricatorModularTransactionType.php
+++ b/src/applications/transactions/storage/PhabricatorModularTransactionType.php
@@ -227,7 +227,7 @@
// server's settings, or the user may later refer back to it after
// changing timezones.
- if ($this->isTextMode()) {
+ if ($this->isRenderingTargetExternal()) {
$offset = $viewer->getTimeZoneOffsetInHours();
if ($offset >= 0) {
$display = pht('%s (UTC+%d)', $display, $offset);
@@ -277,7 +277,17 @@
return !strlen($value);
}
- protected function isTextMode() {
+ /**
+ * When rendering to external targets (Email/Asana/etc), we need to include
+ * more information that users can't obtain later.
+ */
+ final protected function isRenderingTargetExternal() {
+ // Right now, this is our best proxy for this:
+ return $this->isTextMode();
+ // "TARGET_TEXT" means "EMail" and "TARGET_HTML" means "Web".
+ }
+
+ final protected function isTextMode() {
$target = $this->getStorage()->getRenderingTarget();
return ($target == PhabricatorApplicationTransaction::TARGET_TEXT);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 3:21 AM (8 h, 26 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6924699
Default Alt Text
D17063.id41051.diff (1 KB)
Attached To
Mode
D17063: Introduce ModularTransactionType::isRenderingTargetExternal
Attached
Detach File
Event Timeline
Log In to Comment