Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/request/DiffusionRequest.php
Show First 20 Lines • Show All 383 Lines • ▼ Show 20 Lines | /* -( Creating Requests )-------------------------------------------------- */ | ||||
public function loadCommit() { | public function loadCommit() { | ||||
if (empty($this->repositoryCommit)) { | if (empty($this->repositoryCommit)) { | ||||
$repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
$commit = id(new DiffusionCommitQuery()) | $commit = id(new DiffusionCommitQuery()) | ||||
->setViewer($this->getUser()) | ->setViewer($this->getUser()) | ||||
->withRepositoryIDs(array($repository->getID())) | ->withRepository($repository) | ||||
->withIdentifiers(array($this->getStableCommit())) | ->withIdentifiers(array($this->getStableCommit())) | ||||
->executeOne(); | ->executeOne(); | ||||
if ($commit) { | if ($commit) { | ||||
$commit->attachRepository($repository); | $commit->attachRepository($repository); | ||||
} | } | ||||
$this->repositoryCommit = $commit; | $this->repositoryCommit = $commit; | ||||
} | } | ||||
return $this->repositoryCommit; | return $this->repositoryCommit; | ||||
▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines |