diff --git a/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php b/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php index a197eacb49..2c8ea95e8a 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php @@ -15,7 +15,6 @@ use Silex\Application; use Silex\ControllerProviderInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\KernelEvents; class DoDownload implements ControllerProviderInterface { @@ -124,7 +123,8 @@ class DoDownload implements ControllerProviderInterface 'module' => _('Export'), 'list' => $list, 'records' => $records, - 'token' => $token + 'token' => $token, + 'anonymous' => $request->query->get('anonymous', false) ))); } @@ -166,7 +166,13 @@ class DoDownload implements ControllerProviderInterface } $app->finish(function ($request, $response) use ($list, $app) { - \set_export::log_download($app, $list, $request->request->get('type')); + \set_export::log_download( + $app, + $list, + $request->request->get('type'), + (null !== $request->request->get('anonymous') ? true : false), + (isset($list['email']) ? $list['email'] : '') + ); }); $response = \set_export::stream_file( diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Export.php b/lib/Alchemy/Phrasea/Controller/Prod/Export.php index 4b7ecdfe23..4877a889be 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Export.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Export.php @@ -274,7 +274,7 @@ class Export implements ControllerProviderInterface $remaingEmails = $destMails; - $url = $app['phraseanet.registry']->get('GV_ServerName') . 'mail-export/' . $token . '/'; + $url = $app['phraseanet.registry']->get('GV_ServerName') . 'download/' . $token . '/prepare/?anonymous'; $from = array( 'name' => $app['phraseanet.user']->get_display_name(), diff --git a/templates/web/prod/actions/Download/prepare.html.twig b/templates/web/prod/actions/Download/prepare.html.twig index 9311d291af..c45ff16ae3 100644 --- a/templates/web/prod/actions/Download/prepare.html.twig +++ b/templates/web/prod/actions/Download/prepare.html.twig @@ -83,7 +83,11 @@
-
+
+ {% if anonymous %} + + {% endif%} +