Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialRevision.php
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | public function getMonogram() { | ||||
$id = $this->getID(); | $id = $this->getID(); | ||||
return "D{$id}"; | return "D{$id}"; | ||||
} | } | ||||
public function getURI() { | public function getURI() { | ||||
return '/'.$this->getMonogram(); | return '/'.$this->getMonogram(); | ||||
} | } | ||||
public function loadIDsByCommitPHIDs($phids) { | |||||
if (!$phids) { | |||||
return array(); | |||||
} | |||||
$revision_ids = queryfx_all( | |||||
$this->establishConnection('r'), | |||||
'SELECT * FROM %T WHERE commitPHID IN (%Ls)', | |||||
self::TABLE_COMMIT, | |||||
$phids); | |||||
return ipull($revision_ids, 'revisionID', 'commitPHID'); | |||||
} | |||||
public function loadCommitPHIDs() { | public function loadCommitPHIDs() { | ||||
if (!$this->getID()) { | if (!$this->getID()) { | ||||
return ($this->commits = array()); | return ($this->commits = array()); | ||||
} | } | ||||
$commits = queryfx_all( | $commits = queryfx_all( | ||||
$this->establishConnection('r'), | $this->establishConnection('r'), | ||||
'SELECT commitPHID FROM %T WHERE revisionID = %d', | 'SELECT commitPHID FROM %T WHERE revisionID = %d', | ||||
▲ Show 20 Lines • Show All 1,003 Lines • Show Last 20 Lines |