@@ -, +, @@ last step 'cache_expiry', 300, 'cache_expiry_units', 'public', 1 --- reports/guided_reports.pl | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) --- a/reports/guided_reports.pl +++ a/reports/guided_reports.pl @@ -215,8 +215,6 @@ elsif ( $phase eq 'Update SQL'){ 'group' => $group, 'subgroup' => $subgroup, 'notes' => $notes, - 'cache_expiry' => $cache_expiry, - 'cache_expiry_units' => $cache_expiry_units, 'public' => $public, 'problematic_authvals' => $problematic_authvals, 'warn_authval_problem' => 1, @@ -231,7 +229,6 @@ elsif ( $phase eq 'Update SQL'){ group => $group, subgroup => $subgroup, notes => $notes, - cache_expiry => $cache_expiry, public => $public, } ); $template->param( @@ -240,6 +237,12 @@ elsif ( $phase eq 'Update SQL'){ 'id' => $id, ); } + if ( $usecache ) { + $template->param( + cache_expiry => $cache_expiry, + cache_expiry_units => $cache_expiry_units, + ); + } } } @@ -312,6 +315,7 @@ elsif ( $phase eq 'Choose these columns' ) { my $type = $input->param('type'); my @columns = $input->param('columns'); my $column = join( ',', @columns ); + $template->param( 'build4' => 1, 'area' => $area, @@ -319,10 +323,15 @@ elsif ( $phase eq 'Choose these columns' ) { 'column' => $column, definitions => get_from_dictionary($area), criteria => get_criteria($area,$input), - 'cache_expiry' => $input->param('cache_expiry'), - 'cache_expiry_units' => $input->param('cache_expiry_units'), 'public' => $input->param('public'), ); + if ( $usecache ) { + $template->param( + cache_expiry => $input->param('cache_expiry'), + cache_expiry_units => $input->param('cache_expiry_units'), + ); + } + } elsif ( $phase eq 'Choose these criteria' ) { @@ -373,10 +382,14 @@ elsif ( $phase eq 'Choose these criteria' ) { 'column' => $column, 'definition' => $definition, 'criteriastring' => $query_criteria, - 'cache_expiry' => $input->param('cache_expiry'), - 'cache_expiry_units' => $input->param('cache_expiry_units'), 'public' => $input->param('public'), ); + if ( $usecache ) { + $template->param( + cache_expiry => $input->param('cache_expiry'), + cache_expiry_units => $input->param('cache_expiry_units'), + ); + } # get columns my @columns = split( ',', $column ); @@ -555,13 +568,17 @@ elsif ( $phase eq 'Save Report' ) { 'reportname' => $name, 'type' => $type, 'notes' => $notes, - 'cache_expiry' => $cache_expiry, - 'cache_expiry_units' => $cache_expiry_units, 'public' => $public, 'problematic_authvals' => $problematic_authvals, 'warn_authval_problem' => 1, 'phase_save' => 1 ); + if ( $usecache ) { + $template->param( + cache_expiry => $cache_expiry, + cache_expiry_units => $cache_expiry_units, + ); + } } else { # No params problem found or asked to save anyway my $id = save_report( { --