From e288a2af2e7c8327e8bcf882bf3cd7e2ed27711e Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 12 Nov 2014 18:50:32 +0100 Subject: [PATCH 1/8] PHRAS-336 #fix download of xml caption --- lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php b/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php index b0575ab619..416bb41d73 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/DoDownload.php @@ -92,6 +92,8 @@ class DoDownload implements ControllerProviderInterface */ public function prepareDownload(Application $app, Request $request, $token) { + + $datas = $app['tokens']->helloToken($token); if (false === $list = @unserialize((string) $datas['datas'])) { @@ -207,12 +209,12 @@ class DoDownload implements ControllerProviderInterface $app['session']->save(); ignore_user_abort(true); - \set_export::build_zip( - $app, - $token, - $list, - sprintf($app['root.path'] . '/tmp/download/%s.zip', $datas['value']) // Dest file - ); + if ($list['count'] > 1) { + \set_export::build_zip($app, $token, $list, sprintf($app['root.path'] . '/tmp/download/%s.zip', $datas['value'])); + } else { + $list['complete'] = true; + $app['tokens']->updateToken($token, serialize($list)); + } return $app->json(array( 'success' => true, From 6e7f8cbb7ef475f5082c5b00ca190e825d5923ba Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Wed, 12 Nov 2014 18:51:07 +0100 Subject: [PATCH 2/8] PHRAS-294 #fix default date selection --- templates/web/prod/index.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index a6b1b1e518..82d0d59859 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -334,9 +334,9 @@ {% trans 'Trier par ' %}