From 2fd01051fdf69ba1f1a94bb3ae830352dfe7b790 Mon Sep 17 00:00:00 2001 From: Mason James Date: Mon, 9 Mar 2009 15:13:06 +1300 Subject: [PATCH] patch for bug-3017 Signed-off-by: Galen Charlton --- C4/Reports/Guided.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Reports/Guided.pm b/C4/Reports/Guided.pm index 5df6c2a5f4..0e4f41827d 100644 --- a/C4/Reports/Guided.pm +++ b/C4/Reports/Guided.pm @@ -483,7 +483,7 @@ Given some sql and a name this will saved it so that it can resued sub save_report { my ( $sql, $name, $type, $notes ) = @_; my $dbh = C4::Context->dbh(); - $sql =~ s/(\W*)$//; + $sql =~ s/(\s*\;\s*)$//; # removes trailing whitespace and /;/ my $query = "INSERT INTO saved_sql (borrowernumber,date_created,last_modified,savedsql,report_name,type,notes) VALUES (?,now(),now(),?,?,?,?)"; my $sth = $dbh->prepare($query); -- 2.39.5