mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
PHRAS-4078_ExpiringRight-to-core (#4526)
* wip do not merge * fix event EXPORT_CREATE for basket download * fix bad conf (not a worker) * fix bad table name
This commit is contained in:
@@ -67,6 +67,12 @@ class DownloadController extends Controller
|
||||
$list['include_report'] = $request->request->get('include_report') === 'INCLUDE_REPORT';
|
||||
$list['include_businessfields'] = (bool)$request->request->get('businessfields');
|
||||
|
||||
$lst = [];
|
||||
foreach ($list['files'] as $file) {
|
||||
$lst[] = $this->getApplicationBox()->get_collection($file['base_id'])->get_databox()->get_sbas_id() . '_' . $file['record_id'];
|
||||
}
|
||||
$lst = join(';', $lst);
|
||||
|
||||
$token = $this->getTokenManipulator()->createDownloadToken($this->getAuthenticatedUser(), serialize($list));
|
||||
|
||||
$this->getDispatcher()->dispatch(PhraseaEvents::EXPORT_CREATE, new ExportEvent(
|
||||
@@ -136,6 +142,12 @@ class DownloadController extends Controller
|
||||
$records[sprintf('%s_%s', $sbasId, $file['record_id'])] = $record;
|
||||
}
|
||||
|
||||
$lst = [];
|
||||
foreach ($list['files'] as $file) {
|
||||
$lst[] = $this->getApplicationBox()->get_collection($file['base_id'])->get_databox()->get_sbas_id() . '_' . $file['record_id'];
|
||||
}
|
||||
$lst = join(';', $lst);
|
||||
|
||||
$token = $this->getTokenManipulator()->createDownloadToken($this->getAuthenticatedUser(), serialize($list));
|
||||
|
||||
$pusher_auth_key =$this->getConf()->get(['download_async', 'enabled'], false) ? $this->getConf()->get(['externalservice', 'pusher', 'auth_key'], '') : null;
|
||||
|
Reference in New Issue
Block a user