Differential D21287 Diff 50690 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 121 Lines • ▼ Show 20 Lines | public function setContentSource(PhabricatorContentSource $content_source) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getContentSource() { | public function getContentSource() { | ||||
return PhabricatorContentSource::newFromSerialized($this->contentSource); | return PhabricatorContentSource::newFromSerialized($this->contentSource); | ||||
} | } | ||||
public function hasComment() { | public function hasComment() { | ||||
if (!$this->getComment()) { | $comment = $this->getComment(); | ||||
if (!$comment) { | |||||
return false; | return false; | ||||
} | } | ||||
$content = $this->getComment()->getContent(); | if ($comment->isEmptyComment()) { | ||||
// If the content is empty or consists of only whitespace, don't count | |||||
// this as comment. | |||||
if (!strlen(trim($content))) { | |||||
return false; | return false; | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
public function getComment() { | public function getComment() { | ||||
if ($this->commentNotLoaded) { | if ($this->commentNotLoaded) { | ||||
▲ Show 20 Lines • Show All 1,658 Lines • Show Last 20 Lines |