From 5bf40a92a1694034d7aba1ca27d01e42dd59c95d Mon Sep 17 00:00:00 2001 From: "Eric J. Bowersox" Date: Wed, 16 Jan 2002 22:12:39 +0000 Subject: [PATCH] fixed an obscure bug in Find Posts that caused the Next/Previous buttons to not show up when searching for posts globally or in communities --- .../venice/core/impl/CommunityUserContextImpl.java | 4 ++-- src/com/silverwrist/venice/core/impl/UserContextImpl.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/silverwrist/venice/core/impl/CommunityUserContextImpl.java b/src/com/silverwrist/venice/core/impl/CommunityUserContextImpl.java index 98a9755..972e01d 100644 --- a/src/com/silverwrist/venice/core/impl/CommunityUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/CommunityUserContextImpl.java @@ -11,7 +11,7 @@ * * The Initial Developer of the Original Code is Eric J. Bowersox , * for Silverwrist Design Studios. Portions created by Eric J. Bowersox are - * Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. + * Copyright (C) 2001-02 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved. * * Contributor(s): */ @@ -1440,7 +1440,7 @@ class CommunityUserContextImpl implements CommunityContext, CommunityBackend + ">= c.read_lvl AND t.confid = c.confid AND t.topicid = p.topicid AND " + "p.scribble_uid IS NULL AND p.postid = d.postid AND MATCH(d.data) AGAINST ("); sql.append(SQLUtil.encodeStringArg(search_terms)).append(") LIMIT ").append(offset).append(", "); - sql.append(count).append(';'); + sql.append(count+1).append(';'); // execute the query and load the results into the return arraylist ResultSet rs = stmt.executeQuery(sql.toString()); diff --git a/src/com/silverwrist/venice/core/impl/UserContextImpl.java b/src/com/silverwrist/venice/core/impl/UserContextImpl.java index 6410ac0..b772a2e 100644 --- a/src/com/silverwrist/venice/core/impl/UserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/UserContextImpl.java @@ -1482,7 +1482,7 @@ class UserContextImpl implements UserContext, UserBackend + "IFNULL(x.granted_lvl,0)) >= c.read_lvl AND t.confid = c.confid AND t.topicid = p.topicid " + "AND p.scribble_uid IS NULL AND p.postid = d.postid AND MATCH(d.data) AGAINST ("); sql.append(SQLUtil.encodeStringArg(search_terms)).append(") LIMIT ").append(offset).append(", "); - sql.append(count).append(';'); + sql.append(count+1).append(';'); // execute the query and load the results into the return arraylist ResultSet rs = stmt.executeQuery(sql.toString());