Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryCommit.php
Show First 20 Lines • Show All 472 Lines • ▼ Show 20 Lines | final class PhabricatorRepositoryCommit | ||||
public function newCommitAuthorView(PhabricatorUser $viewer) { | public function newCommitAuthorView(PhabricatorUser $viewer) { | ||||
$author_phid = $this->getAuthorDisplayPHID(); | $author_phid = $this->getAuthorDisplayPHID(); | ||||
if ($author_phid) { | if ($author_phid) { | ||||
$handles = $viewer->loadHandles(array($author_phid)); | $handles = $viewer->loadHandles(array($author_phid)); | ||||
return $handles[$author_phid]->renderLink(); | return $handles[$author_phid]->renderLink(); | ||||
} | } | ||||
$author = $this->getRawAuthorStringForDisplay(); | $author = $this->getRawAuthorStringForDisplay(); | ||||
if (strlen($author)) { | if ($author !== null && strlen($author)) { | ||||
return DiffusionView::renderName($author); | return DiffusionView::renderName($author); | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
public function newCommitCommitterView(PhabricatorUser $viewer) { | public function newCommitCommitterView(PhabricatorUser $viewer) { | ||||
$committer_phid = $this->getCommitterDisplayPHID(); | $committer_phid = $this->getCommitterDisplayPHID(); | ||||
if ($committer_phid) { | if ($committer_phid) { | ||||
$handles = $viewer->loadHandles(array($committer_phid)); | $handles = $viewer->loadHandles(array($committer_phid)); | ||||
return $handles[$committer_phid]->renderLink(); | return $handles[$committer_phid]->renderLink(); | ||||
} | } | ||||
$committer = $this->getRawCommitterStringForDisplay(); | $committer = $this->getRawCommitterStringForDisplay(); | ||||
if (strlen($committer)) { | if ($committer !== null && strlen($committer)) { | ||||
return DiffusionView::renderName($committer); | return DiffusionView::renderName($committer); | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
public function isAuthorSameAsCommitter() { | public function isAuthorSameAsCommitter() { | ||||
$author_phid = $this->getAuthorDisplayPHID(); | $author_phid = $this->getAuthorDisplayPHID(); | ||||
▲ Show 20 Lines • Show All 474 Lines • Show Last 20 Lines |