SQL quoting fix, re Bug [1059647]
This commit is contained in:
parent
3438a0b5a5
commit
1722c0ab7b
1 changed files with 1 additions and 1 deletions
|
|
@ -2046,7 +2046,7 @@ sub www_search {
|
|||
$var{'post.user.label'} = WebGUI::International::get(244);
|
||||
my $constraints = WebGUI::Search::buildConstraints([qw(a.subject a.username a.message)]);
|
||||
my $query = "select a.forumPostId, a.subject, a.userId, a.username, a.dateOfPost from forumPost a left join forumThread b
|
||||
on a.forumThreadId=b.forumThreadId where b.forumId=".$forum->get("forumId")." and
|
||||
on a.forumThreadId=b.forumThreadId where b.forumId=".quote($forum->get("forumId"))." and
|
||||
(a.status='approved' or a.status='archived') and $constraints order by a.dateOfPost desc";
|
||||
my $p = WebGUI::Paginator->new(WebGUI::URL::append($caller->{callback},"forumOp=search&doit=1&forumId=".$forum->get("forumId")), $numResults);
|
||||
$p->setDataByQuery($query) if $constraints;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue