Differential D19968 Diff 47707 src/applications/transactions/storage/PhabricatorApplicationTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/storage/PhabricatorApplicationTransaction.php
Show First 20 Lines • Show All 757 Lines • ▼ Show 20 Lines | public function shouldHideForFeed() { | ||||
return $this->shouldHide(); | return $this->shouldHide(); | ||||
} | } | ||||
public function shouldHideForNotifications() { | public function shouldHideForNotifications() { | ||||
return $this->shouldHideForFeed(); | return $this->shouldHideForFeed(); | ||||
} | } | ||||
private function getTitleForMailWithRenderingTarget($new_target) { | |||||
$old_target = $this->getRenderingTarget(); | |||||
try { | |||||
$this->setRenderingTarget($new_target); | |||||
$result = $this->getTitleForMail(); | |||||
} catch (Exception $ex) { | |||||
$this->setRenderingTarget($old_target); | |||||
throw $ex; | |||||
} | |||||
$this->setRenderingTarget($old_target); | |||||
return $result; | |||||
} | |||||
public function getTitleForMail() { | public function getTitleForMail() { | ||||
return id(clone $this)->setRenderingTarget('text')->getTitle(); | return $this->getTitle(); | ||||
} | |||||
public function getTitleForTextMail() { | |||||
return $this->getTitleForMailWithRenderingTarget(self::TARGET_TEXT); | |||||
} | } | ||||
public function getTitleForHTMLMail() { | public function getTitleForHTMLMail() { | ||||
$title = $this->getTitleForMail(); | $title = $this->getTitleForMailWithRenderingTarget(self::TARGET_HTML); | ||||
if ($title === null) { | if ($title === null) { | ||||
return null; | return null; | ||||
} | } | ||||
if ($this->hasChangeDetails()) { | if ($this->hasChangeDetails()) { | ||||
$details_uri = $this->getChangeDetailsURI(); | $details_uri = $this->getChangeDetailsURI(); | ||||
$details_uri = PhabricatorEnv::getProductionURI($details_uri); | $details_uri = PhabricatorEnv::getProductionURI($details_uri); | ||||
▲ Show 20 Lines • Show All 954 Lines • Show Last 20 Lines |