flagsrequired => { reports => $flagsrequired },
}
);
-my $session = $cookie ? get_session($cookie->value) : undef;
+my $session_id = $input->cookie('CGISESSID');
+my $session = $session_id ? get_session($session_id) : undef;
my $filter;
if ( $input->param("filter_set") or $input->param('clear_filters') ) {
'notes' => $report->notes,
'sql' => $report->savedsql,
'showsql' => 1,
- 'mana_success' => $input->param('mana_success'),
'mana_success' => scalar $input->param('mana_success'),
'mana_id' => $report->{mana_id},
'mana_comments' => $report->{comments}
} else {
my ($sql,$header_types) = $report->prep_report( \@param_names, \@sql_params );
$template->param(header_types => $header_types);
- my ( $sth, $errors ) = execute_query( $sql, $offset, $limit, undef, $report_id );
+ my ( $sth, $errors ) = execute_query(
+ {
+ sql => $sql,
+ offset => $offset,
+ limit => $limit,
+ report_id => $report_id,
+ }
+ );
my $total;
if (!$sth) {
die "execute_query failed to return sth for report $report_id: $sql";
push @rows, { cells => \@cells };
}
if( $want_full_chart ){
- my ($sth2, $errors2) = execute_query($sql);
+ my ( $sth2, $errors2 ) = execute_query( { sql => $sql, report_id => $report_id } );
while (my $row = $sth2->fetchrow_arrayref()) {
my @cells = map { +{ cell => $_ } } @$row;
push @allrows, { cells => \@cells };
my $reportfilename = $reportname ? "$reportname-reportresults.$format" : "reportresults.$format" ;
($sql, undef) = $report->prep_report( \@param_names, \@sql_params );
- my ($sth, $q_errors) = execute_query($sql);
+ my ( $sth, $q_errors ) = execute_query( { sql => $sql, report_id => $report_id } );
unless ($q_errors and @$q_errors) {
my ( $type, $content );
if ($format eq 'tab') {