From aaf7d9cf445797934f8053bc26f063721fce80cb Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Mon, 30 Jul 2007 16:27:43 +0000 Subject: [PATCH] fix: New pagination breaks SQL Reports with semicolons --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Paginator.pm | 1 + 2 files changed, 3 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index c7eab609a..c291f140a 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -2,6 +2,8 @@ - Fixed a bug where crons wouldn't load into spectre's queue at startup. - Fixed a bug in the Collaboration System where posts from the Safari browser would be submitted without changes. + - fix: New pagination breaks SQL Reports with semicolons + 7.4.0 - api: Form Controls and Workflow Activities may now include web based helper diff --git a/lib/WebGUI/Paginator.pm b/lib/WebGUI/Paginator.pm index 348ce1033..5f623d20e 100644 --- a/lib/WebGUI/Paginator.pm +++ b/lib/WebGUI/Paginator.pm @@ -691,6 +691,7 @@ sub setDataByQuery { my $start = ( ($pageNumber - 1) * $rowsPerPage ); #Set the query limits + $sql =~ s/;\s+$//; $sql .= " limit $start,$rowsPerPage"; $sql =~ s/select/select SQL_CALC_FOUND_ROWS /;