Bug 13578: Make sure the 'public' parameter is passed to the last step
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 14 Jan 2015 11:03:10 +0000 (12:03 +0100)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 11 Mar 2015 18:16:10 +0000 (15:16 -0300)
commitfe986573dd6a6b10dc0456be2609ee29cb459ac8
treec933a5ee44caeb5fce8b0ffa2db24bb258fe1d32
parentb51ad649168243023b5fdd7936c0230a08c3cbec
Bug 13578: Make sure the 'public' parameter is passed to the last step

If no caching system is up ($usecache == 0), the public parameter is
lost on the step 3.
The hash passed to the template looks like:
   'cache_expiry', 300,
   'cache_expiry_units',
   'public', 1
So the template receives cache_expiry = 300, cache_expiry_units =
'public' and 1 = undef.

This patch fixes the problem passing the cache_expiry* parameters only
if the usecache is set.

Test plan:
0/ Disable any caching system
1/ Create a new public report and go up to the 6th step, save the report
and verify the report is created as public
2/ Enable a caching system
2/ Create a public report with a cache expiry value, save it and verify
the report is created as public and the cache expiry value is correct.

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
reports/guided_reports.pl