@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Introduce ModularTransactionType::isRenderingTargetExternal

Summary: This is just some housekeeping - see note in D16287. Basically, "isTextMode" doesn't convey enough information.

Test Plan: `git grep isTextMode | grep -v Remarkup`, and visit all callsites; There are 4 of them left.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17063

authored by

Aviv Eyal and committed by
avivey
8b7e99f6 f277de1d

+12 -2
+12 -2
src/applications/transactions/storage/PhabricatorModularTransactionType.php
··· 227 227 // server's settings, or the user may later refer back to it after 228 228 // changing timezones. 229 229 230 - if ($this->isTextMode()) { 230 + if ($this->isRenderingTargetExternal()) { 231 231 $offset = $viewer->getTimeZoneOffsetInHours(); 232 232 if ($offset >= 0) { 233 233 $display = pht('%s (UTC+%d)', $display, $offset); ··· 277 277 return !strlen($value); 278 278 } 279 279 280 - protected function isTextMode() { 280 + /** 281 + * When rendering to external targets (Email/Asana/etc), we need to include 282 + * more information that users can't obtain later. 283 + */ 284 + final protected function isRenderingTargetExternal() { 285 + // Right now, this is our best proxy for this: 286 + return $this->isTextMode(); 287 + // "TARGET_TEXT" means "EMail" and "TARGET_HTML" means "Web". 288 + } 289 + 290 + final protected function isTextMode() { 281 291 $target = $this->getStorage()->getRenderingTarget(); 282 292 return ($target == PhabricatorApplicationTransaction::TARGET_TEXT); 283 293 }