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())) { | if (!$this->getPHID() || !strlen($this->getPHID())) { | ||||
$this->setPHID($this->generatePHID()); | $this->setPHID($this->generatePHID()); | ||||
} | } | ||||
if (!strlen($this->getProjectPathKey())) { | if (!strlen($this->getProjectPathKey())) { | ||||
$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); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 500 Lines • Show Last 20 Lines |