Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/storage/PhabricatorProject.php
Show First 20 Lines • Show All 401 Lines • ▼ Show 20 Lines | public function getReportsURI() { | ||||
return urisprintf('/project/reports/%d/', $this->getID()); | return urisprintf('/project/reports/%d/', $this->getID()); | ||||
} | } | ||||
public function save() { | public function save() { | ||||
if (!$this->getMailKey()) { | if (!$this->getMailKey()) { | ||||
$this->setMailKey(Filesystem::readRandomCharacters(20)); | $this->setMailKey(Filesystem::readRandomCharacters(20)); | ||||
} | } | ||||
if (!strlen($this->getPHID())) { | $phid = $this->getPHID(); | ||||
if ($phid === null || $phid === '') { | |||||
$this->setPHID($this->generatePHID()); | $this->setPHID($this->generatePHID()); | ||||
} | } | ||||
if (!strlen($this->getProjectPathKey())) { | $path_key = $this->getProjectPathKey(); | ||||
if ($path_key === null || $path_key === '') { | |||||
$hash = PhabricatorHash::digestForIndex($this->getPHID()); | $hash = PhabricatorHash::digestForIndex($this->getPHID()); | ||||
$hash = substr($hash, 0, 4); | $hash = substr($hash, 0, 4); | ||||
$this->setProjectPathKey($hash); | $this->setProjectPathKey($hash); | ||||
} | } | ||||
$path = array(); | $path = array(); | ||||
$depth = 0; | $depth = 0; | ||||
if ($this->parentProjectPHID) { | if ($this->parentProjectPHID) { | ||||
▲ Show 20 Lines • Show All 496 Lines • Show Last 20 Lines |