Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phragment/storage/PhragmentFragment.php
| Show First 20 Lines • Show All 250 Lines • ▼ Show 20 Lines | foreach ($mappings as $path => $data) { | ||||
| // The file is being created. If the data is null, | // The file is being created. If the data is null, | ||||
| // then this is explicitly a directory being created. | // then this is explicitly a directory being created. | ||||
| $file = null; | $file = null; | ||||
| if ($mappings[$path] !== null) { | if ($mappings[$path] !== null) { | ||||
| $file = PhabricatorFile::newFromFileData( | $file = PhabricatorFile::newFromFileData( | ||||
| $mappings[$path], | $mappings[$path], | ||||
| array('name' => basename($path))); | array('name' => basename($path))); | ||||
| } | } | ||||
| PhragmentFragment::createFromFile( | self::createFromFile( | ||||
| $viewer, | $viewer, | ||||
| $file, | $file, | ||||
| $base_path.'/'.$path, | $base_path.'/'.$path, | ||||
| $this->getViewPolicy(), | $this->getViewPolicy(), | ||||
| $this->getEditPolicy()); | $this->getEditPolicy()); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 84 Lines • Show Last 20 Lines | |||||