mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
PHRAS-1375 config xsendfile ne fonctionne plus
This commit is contained in:
@@ -37,7 +37,7 @@ class XSendFileMappingGenerator extends Command
|
||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$extractor = new DataboxPathExtractor($this->container->getApplicationBox());
|
||||
$paths = $extractor->extractPaths();
|
||||
$paths = $extractor->extractPaths('xsendfile');
|
||||
foreach ($paths as $path) {
|
||||
$this->container['filesystem']->mkdir($path);
|
||||
}
|
||||
|
@@ -22,11 +22,19 @@ class DataboxPathExtractor
|
||||
$this->appbox = $appbox;
|
||||
}
|
||||
|
||||
public function extractPaths()
|
||||
/**
|
||||
* @param string $type
|
||||
* @return array
|
||||
*/
|
||||
public function extractPaths($type = null)
|
||||
{
|
||||
$paths = [];
|
||||
|
||||
foreach ($this->appbox->get_databoxes() as $databox) {
|
||||
if ($type === 'xsendfile') {
|
||||
$paths[] = (string) $databox->get_sxml_structure()->path;
|
||||
}
|
||||
|
||||
foreach ($databox->get_subdef_structure()->getSubdefGroup('video') as $subdef) {
|
||||
$paths[] = $subdef->get_path();
|
||||
}
|
||||
|
Reference in New Issue
Block a user