Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialRevision.php
Show All 14 Lines | implements | ||||
PhabricatorDestructibleInterface, | PhabricatorDestructibleInterface, | ||||
PhabricatorProjectInterface, | PhabricatorProjectInterface, | ||||
PhabricatorFulltextInterface, | PhabricatorFulltextInterface, | ||||
PhabricatorFerretInterface, | PhabricatorFerretInterface, | ||||
PhabricatorConduitResultInterface, | PhabricatorConduitResultInterface, | ||||
PhabricatorDraftInterface { | PhabricatorDraftInterface { | ||||
protected $title = ''; | protected $title = ''; | ||||
protected $originalTitle; | |||||
protected $status; | protected $status; | ||||
protected $summary = ''; | protected $summary = ''; | ||||
protected $testPlan = ''; | protected $testPlan = ''; | ||||
protected $authorPHID; | protected $authorPHID; | ||||
protected $lastReviewerPHID; | protected $lastReviewerPHID; | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | return array( | ||||
self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'attached' => self::SERIALIZATION_JSON, | 'attached' => self::SERIALIZATION_JSON, | ||||
'unsubscribed' => self::SERIALIZATION_JSON, | 'unsubscribed' => self::SERIALIZATION_JSON, | ||||
'properties' => self::SERIALIZATION_JSON, | 'properties' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
'title' => 'text255', | 'title' => 'text255', | ||||
'originalTitle' => 'text255', | |||||
'status' => 'text32', | 'status' => 'text32', | ||||
'summary' => 'text', | 'summary' => 'text', | ||||
'testPlan' => 'text', | 'testPlan' => 'text', | ||||
'authorPHID' => 'phid?', | 'authorPHID' => 'phid?', | ||||
'lastReviewerPHID' => 'phid?', | 'lastReviewerPHID' => 'phid?', | ||||
'lineCount' => 'uint32?', | 'lineCount' => 'uint32?', | ||||
'mailKey' => 'bytes40', | 'mailKey' => 'bytes40', | ||||
'branchName' => 'text255?', | 'branchName' => 'text255?', | ||||
Show All 40 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 setTitle($title) { | |||||
$this->title = $title; | |||||
if (!$this->getID()) { | |||||
$this->originalTitle = $title; | |||||
} | |||||
return $this; | |||||
} | |||||
public function loadIDsByCommitPHIDs($phids) { | public function loadIDsByCommitPHIDs($phids) { | ||||
if (!$phids) { | if (!$phids) { | ||||
return array(); | return array(); | ||||
} | } | ||||
$revision_ids = queryfx_all( | $revision_ids = queryfx_all( | ||||
$this->establishConnection('r'), | $this->establishConnection('r'), | ||||
'SELECT * FROM %T WHERE commitPHID IN (%Ls)', | 'SELECT * FROM %T WHERE commitPHID IN (%Ls)', | ||||
self::TABLE_COMMIT, | self::TABLE_COMMIT, | ||||
▲ Show 20 Lines • Show All 892 Lines • Show Last 20 Lines |