Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/storage/PhabricatorFile.php
| Show All 37 Lines | return array( | ||||
| self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
| 'metadata' => self::SERIALIZATION_JSON, | 'metadata' => self::SERIALIZATION_JSON, | ||||
| ), | ), | ||||
| ) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
| } | } | ||||
| public function generatePHID() { | public function generatePHID() { | ||||
| return PhabricatorPHID::generateNewPHID( | return PhabricatorPHID::generateNewPHID( | ||||
| PhabricatorFilePHIDTypeFile::TYPECONST); | PhabricatorFileFilePHIDType::TYPECONST); | ||||
| } | } | ||||
| public function save() { | public function save() { | ||||
| if (!$this->getSecretKey()) { | if (!$this->getSecretKey()) { | ||||
| $this->setSecretKey($this->generateSecretKey()); | $this->setSecretKey($this->generateSecretKey()); | ||||
| } | } | ||||
| if (!$this->getMailKey()) { | if (!$this->getMailKey()) { | ||||
| $this->setMailKey(Filesystem::readRandomCharacters(20)); | $this->setMailKey(Filesystem::readRandomCharacters(20)); | ||||
| ▲ Show 20 Lines • Show All 893 Lines • Show Last 20 Lines | |||||