Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialModernHunk.php
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | $file = PhabricatorFile::newFromFileData( | ||||
'mime-type' => 'application/octet-stream', | 'mime-type' => 'application/octet-stream', | ||||
'viewPolicy' => PhabricatorPolicies::POLICY_NOONE, | 'viewPolicy' => PhabricatorPolicies::POLICY_NOONE, | ||||
)); | )); | ||||
$this->setDataType(self::DATATYPE_FILE); | $this->setDataType(self::DATATYPE_FILE); | ||||
$this->setData($file->getPHID()); | $this->setData($file->getPHID()); | ||||
// NOTE: Because hunks don't have a PHID and we just load hunk data with | // NOTE: Because hunks don't have a PHID and we just load hunk data with | ||||
// the ominipotent viewer, we do not need to attach the file to anything. | // the omnipotent viewer, we do not need to attach the file to anything. | ||||
$result = $this->save(); | $result = $this->save(); | ||||
$this->destroyData($old_type, $old_data); | $this->destroyData($old_type, $old_data); | ||||
return $result; | return $result; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |