diff --git a/src/com/silverwrist/venice/core/impl/SIGCoreData.java b/src/com/silverwrist/venice/core/impl/SIGCoreData.java index a60a29b..bd0fcc5 100644 --- a/src/com/silverwrist/venice/core/impl/SIGCoreData.java +++ b/src/com/silverwrist/venice/core/impl/SIGCoreData.java @@ -165,9 +165,9 @@ class SIGCoreData implements SIGData, SIGDataBackend this.engine = engine; this.datapool = datapool; this.sigid = sigid; - this.created = (java.util.Date)(creation.clone()); - this.last_access = this.created; - this.last_update = this.created; + this.created = creation; + this.last_access = creation; + this.last_update = creation; this.read_level = DefaultLevels.newSIGRead(); this.write_level = DefaultLevels.newSIGWrite(); this.create_level = DefaultLevels.newSIGCreate(); @@ -1800,7 +1800,7 @@ class SIGCoreData implements SIGData, SIGDataBackend Statement stmt = conn.createStatement(); // lock the tables we need to reference immediately - stmt.executeUpdate("LOCK TABLES sigs WRITE, sigmember WRITE, sigtoconf READ;"); + stmt.executeUpdate("LOCK TABLES sigs WRITE, sigmember WRITE, confhotlist WRITE, sigtoconf READ;"); try { // first delete the SIG record itself stmt.executeUpdate("DELETE FROM sigs WHERE sigid = " + sigid + ";"); @@ -1808,6 +1808,10 @@ class SIGCoreData implements SIGData, SIGDataBackend // now delete the members list stmt.executeUpdate("DELETE FROM sigmember WHERE sigid = " + sigid + ";"); + // We need to make sure this SIG's conferences are removed from everyone's hotlist, + // if they're present. (Bug #415474) + stmt.executeUpdate("DELETE FROM confhotlist WHERE sigid = " + sigid + ";"); + // determine the number of conferences in this SIG, and the maximum conference ID ResultSet rs = stmt.executeQuery("SELECT COUNT(*), MAX(confid) FROM sigtoconf WHERE sigid = " + sigid + ";"); diff --git a/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java b/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java index 65d06de..16dc824 100644 --- a/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java +++ b/src/com/silverwrist/venice/core/impl/TopicMessageUserContextImpl.java @@ -746,9 +746,10 @@ class TopicMessageUserContextImpl implements TopicMessageContext if (stmt.executeUpdate("DELETE FROM postpublish WHERE postid = " + postid + ";")>0) engine.unpublish(postid); - // Phase 1 of renumber - Renumber all posts that had a number higher than the one - // we just blew to hell. - stmt.executeUpdate("UPDATE posts SET num = (num - 1) WHERE num > " + x_post_num + ";"); + // Phase 1 of renumber - Renumber all posts IN THIS TOPIC that had a number higher than the one + // we just blew to hell. (Must have the "topicid =" clause in there - see Bug #415473) + stmt.executeUpdate("UPDATE posts SET num = (num - 1) WHERE topicid = " + x_topic_id + " AND num > " + + x_post_num + ";"); // Phase 2 of renumber - The topic now has one less post in it. Reflect that. stmt.executeUpdate("UPDATE topics SET top_message = (top_message - 1) WHERE topicid = " diff --git a/src/com/silverwrist/venice/servlets/SIGOperations.java b/src/com/silverwrist/venice/servlets/SIGOperations.java index f272c3a..0934d15 100644 --- a/src/com/silverwrist/venice/servlets/SIGOperations.java +++ b/src/com/silverwrist/venice/servlets/SIGOperations.java @@ -193,6 +193,8 @@ public class SIGOperations extends VeniceServlet // present the "Create New SIG" dialog CreateSIGDialog dlg = makeCreateSIGDialog(); dlg.setupDialog(engine); + dlg.setFieldValue("language","en-US"); + dlg.setFieldValue("country","US"); changeMenuTop(request); return dlg; diff --git a/src/com/silverwrist/venice/servlets/format/NewSIGWelcome.java b/src/com/silverwrist/venice/servlets/format/NewSIGWelcome.java index 57350ac..22cdf3b 100644 --- a/src/com/silverwrist/venice/servlets/format/NewSIGWelcome.java +++ b/src/com/silverwrist/venice/servlets/format/NewSIGWelcome.java @@ -108,7 +108,7 @@ public class NewSIGWelcome implements JSPRender public String getDisplayURL(RenderData rdat) { - return rdat.getFullServletPath(entry_url); + return rdat.getCompleteServletPath(entry_url); } // end getEntryURL diff --git a/src/com/silverwrist/venice/servlets/format/RenderData.java b/src/com/silverwrist/venice/servlets/format/RenderData.java index 351c114..80f467b 100644 --- a/src/com/silverwrist/venice/servlets/format/RenderData.java +++ b/src/com/silverwrist/venice/servlets/format/RenderData.java @@ -149,6 +149,17 @@ public class RenderData } // end getFullServletPath + public String getCompleteServletPath(String name) + { + StringBuffer buf = new StringBuffer("http://"); + buf.append(request.getServerName()); + if (request.getServerPort()!=80) + buf.append(':').append(request.getServerPort()); + buf.append(request.getContextPath()).append('/').append(name); + return buf.toString(); + + } // end getCompleteServletPath + public String getEncodedServletPath(String name) { return response.encodeURL(this.getFullServletPath(name)); diff --git a/web/format/topics.jsp b/web/format/topics.jsp index 75dd2c9..763dff4 100644 --- a/web/format/topics.jsp +++ b/web/format/topics.jsp @@ -24,12 +24,13 @@ TopicListing data = TopicListing.retrieve(request); Variables.failIfNull(data); RenderData rdat = RenderConfig.createRenderData(application,request,response); + String stdfont = rdat.getStdFontTag(null,2); String self = "confdisp?" + data.getLocator(); String tmp; %> <% if (rdat.useHTMLComments()) { %><% } %> <% rdat.writeContentHeader(out,"Topics in " + data.getConfName(),null); %> -<%= rdat.getStdFontTag(null,2) %> +<%= stdfont %>
" ALT="Conference List" WIDTH=80 HEIGHT=24 @@ -56,38 +57,38 @@ <% if (data.anyTopics()) { %> - - - - - - + <% Iterator it = data.getTopicIterator(); %> <% while (it.hasNext()) { %> <% @@ -95,10 +96,10 @@ tmp = self + "&top=" + topic.getTopicNumber() + "&rnm=1"; %> - - - - -
<%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <% tmp = self + "&sort=" + (data.isSort(ConferenceContext.SORT_NUMBER) ? -ConferenceContext.SORT_NUMBER : ConferenceContext.SORT_NUMBER); %> # <%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <% tmp = self + "&sort=" + (data.isSort(ConferenceContext.SORT_NAME) ? -ConferenceContext.SORT_NAME : ConferenceContext.SORT_NAME); %> Topic Name <%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <% tmp = self + "&sort=" + (data.isSort(ConferenceContext.SORT_UNREAD) ? -ConferenceContext.SORT_UNREAD : ConferenceContext.SORT_UNREAD); %> New <%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <% tmp = self + "&sort=" + (data.isSort(ConferenceContext.SORT_TOTAL) ? -ConferenceContext.SORT_TOTAL : ConferenceContext.SORT_TOTAL); %> Total <%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <% tmp = self + "&sort=" + (data.isSort(ConferenceContext.SORT_DATE) ? -ConferenceContext.SORT_DATE : ConferenceContext.SORT_DATE); %> Last Response
<%= rdat.getStdFontTag(null,2) %> 
 
<%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <%= topic.getTopicNumber() %>   <%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <%= topic.getName() %> <% if (topic.isArchived() && !(data.isView(ConferenceContext.DISPLAY_ARCHIVED))) { %> (archived) @@ -106,14 +107,14 @@ (frozen) <% } // end if %> <%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <%= topic.getUnreadMessages() %> <%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> "><%= topic.getTotalMessages() %> <%= rdat.getStdFontTag(null,2) %> + <%= stdfont %> <%= rdat.formatDateForDisplay(topic.getLastUpdateDate()) %>