From 131ca67f2d6bd41d1bb6f1f74fd862abc992e24a Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Mon, 29 Oct 2007 13:22:58 -0500 Subject: [PATCH] Catching up changes in reports Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- C4/Auth.pm | 1 - C4/Reports.pm | 8 ++++++-- reports/guided_reports.pl | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index ce0824b26c..415e585594 100755 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -24,7 +24,6 @@ use strict; use Digest::MD5 qw(md5_base64); use CGI::Session; - require Exporter; use C4::Context; use C4::Output; # to get the template diff --git a/C4/Reports.pm b/C4/Reports.pm index aca6c205e6..f0efb6022b 100644 --- a/C4/Reports.pm +++ b/C4/Reports.pm @@ -447,8 +447,12 @@ sub format_results { $row->{'row'} = $htmlrow; } $sth->finish; - return $perl; - + $query = "SELECT * FROM saved_sql WHERE id = ?"; + $sth = $dbh->prepare($query); + $sth->execute($id); + $data = $sth->fetchrow_hashref(); + $sth->finish(); + return ($perl,$data->{'report_name'},$data->{'notes'}); } sub delete_report { diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index dc19c0a078..5cc3cc0a74 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -98,11 +98,13 @@ elsif ( $phase eq 'Show SQL'){ elsif ($phase eq 'retrieve results') { my $id = $input->param('id'); - my $results = format_results($id); + my ($results,$name,$notes) = format_results($id); # do something $template->param( 'retresults' => 1, 'results' => $results, + 'name' => $name, + 'notes' => $notes, ); } -- 2.39.2