fixed bug with not allowing attachments with Post & Go Topics; fixed
compile error with removal of Smart Tags; made "New!" flags on conferences actually *do* something (read new messages)
This commit is contained in:
parent
a9847865d9
commit
e108be62da
|
@ -390,32 +390,85 @@ public class ConfDisplay extends VeniceServlet
|
|||
{ // we're displaying the conference's topic list
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("MODE: display topics in conference");
|
||||
setMyLocation(request,"confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID());
|
||||
String on_error = "confops?sig=" + sig.getSIGID();
|
||||
String my_location = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID();
|
||||
boolean read_new = !(StringUtil.isStringEmpty(request.getParameter("rnm")));
|
||||
if (read_new)
|
||||
my_location += "&rn=1";
|
||||
setMyLocation(request,my_location);
|
||||
|
||||
// get any changes to view or sort options
|
||||
TopicSortHolder opts = TopicSortHolder.retrieve(request.getSession(true));
|
||||
getViewSortDefaults(request,conf.getConfID(),opts,on_error);
|
||||
|
||||
TopicListing tl = null;
|
||||
try
|
||||
{ // create the topic lict
|
||||
tl = new TopicListing(request,sig,conf,opts.getViewOption(conf.getConfID()),
|
||||
opts.getSortOption(conf.getConfID()));
|
||||
if (read_new)
|
||||
{ // we need to generate a TopicPosts view
|
||||
TopicPosts tpos = null;
|
||||
|
||||
} // end try
|
||||
catch (DataException de)
|
||||
{ // there was a database error retrieving topics
|
||||
return new ErrorBox("Database Error","Database error listing topics: " + de.getMessage(),on_error);
|
||||
try
|
||||
{ // generate a topic list first
|
||||
List topic_list = conf.getTopicList(opts.getViewOption(conf.getConfID()),
|
||||
opts.getSortOption(conf.getConfID()));
|
||||
|
||||
} // end catch
|
||||
catch (AccessError ae)
|
||||
{ // we were unable to retrieve the topic list
|
||||
return new ErrorBox("Access Error",ae.getMessage(),on_error);
|
||||
// now generate the topic visit order
|
||||
TopicVisitOrder ord = TopicVisitOrder.initialize(request.getSession(true),conf.getConfID(),
|
||||
topic_list);
|
||||
|
||||
} // end catch
|
||||
// use the new visit order to get the topic we need to visit
|
||||
short topic_nbr = ord.getNext();
|
||||
Iterator it = topic_list.iterator();
|
||||
while (it.hasNext())
|
||||
{ // locate the first topic to be read
|
||||
topic = (TopicContext)(it.next());
|
||||
if (topic.getTopicNumber()==topic_nbr)
|
||||
break;
|
||||
|
||||
return tl;
|
||||
} // end while
|
||||
|
||||
// determine what the post interval is we want to display
|
||||
PostInterval piv = getInterval(engine,request,topic,on_error);
|
||||
|
||||
// create the topic posts view
|
||||
tpos = new TopicPosts(request,engine,sig,conf,topic,piv.getFirst(),piv.getLast(),true,false);
|
||||
|
||||
} // end try
|
||||
catch (DataException de)
|
||||
{ // there was a database error retrieving messages
|
||||
return new ErrorBox("Database Error","Database error listing messages: " + de.getMessage(),on_error);
|
||||
|
||||
} // end catch
|
||||
catch (AccessError ae)
|
||||
{ // we were unable to retrieve the message list
|
||||
return new ErrorBox("Access Error",ae.getMessage(),on_error);
|
||||
|
||||
} // end catch
|
||||
|
||||
return tpos; // this is what we need!
|
||||
|
||||
} // end if (creating a "read new" topic list view)
|
||||
else
|
||||
{ // topic listing only...
|
||||
TopicListing tl = null;
|
||||
try
|
||||
{ // create the topic lict
|
||||
tl = new TopicListing(request,sig,conf,opts.getViewOption(conf.getConfID()),
|
||||
opts.getSortOption(conf.getConfID()));
|
||||
|
||||
} // end try
|
||||
catch (DataException de)
|
||||
{ // there was a database error retrieving topics
|
||||
return new ErrorBox("Database Error","Database error listing topics: " + de.getMessage(),on_error);
|
||||
|
||||
} // end catch
|
||||
catch (AccessError ae)
|
||||
{ // we were unable to retrieve the topic list
|
||||
return new ErrorBox("Access Error",ae.getMessage(),on_error);
|
||||
|
||||
} // end catch
|
||||
|
||||
return tl;
|
||||
|
||||
} // end else (not reading new messages, but just displaying topics)
|
||||
|
||||
} // end else (topics in a conference)
|
||||
|
||||
|
|
|
@ -135,34 +135,38 @@ public class PostMessage extends VeniceServlet
|
|||
if (!(yes.equals(request.getParameter("slip"))))
|
||||
topic.fixSeen(); // no slippage = make sure we mark all as read
|
||||
|
||||
if (go_topics) // jump back to the topic list, puhleaze
|
||||
throw new RedirectResult("confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID());
|
||||
// where do we want to go now?
|
||||
String target;
|
||||
if (go_topics)
|
||||
target = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID();
|
||||
else
|
||||
{ // figure out what topic to go to next
|
||||
short next;
|
||||
try
|
||||
{ // attempt to get the value of the "next topic" parameter
|
||||
if (go_next)
|
||||
{ // get the "next topic" parameter
|
||||
String foo = request.getParameter("next");
|
||||
if (StringUtil.isStringEmpty(foo))
|
||||
next = topic.getTopicNumber();
|
||||
else
|
||||
next = Short.parseShort(foo);
|
||||
|
||||
short next;
|
||||
try
|
||||
{ // attempt to get the value of the "next topic" parameter
|
||||
if (go_next)
|
||||
{ // get the "next topic" parameter
|
||||
String foo = request.getParameter("next");
|
||||
if (StringUtil.isStringEmpty(foo))
|
||||
next = topic.getTopicNumber();
|
||||
} // end if
|
||||
else
|
||||
next = Short.parseShort(foo);
|
||||
next = topic.getTopicNumber();
|
||||
|
||||
} // end if
|
||||
else
|
||||
} // end try
|
||||
catch (NumberFormatException nfe)
|
||||
{ // just default me
|
||||
next = topic.getTopicNumber();
|
||||
|
||||
} // end try
|
||||
catch (NumberFormatException nfe)
|
||||
{ // just default me
|
||||
next = topic.getTopicNumber();
|
||||
} // end catch
|
||||
|
||||
} // end catch
|
||||
target = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&top="
|
||||
+ next + "&rnm=1";
|
||||
|
||||
// where do we want to go now?
|
||||
String target = "confdisp?sig=" + sig.getSIGID() + "&conf=" + conf.getConfID() + "&top="
|
||||
+ next + "&rnm=1";
|
||||
} // end else
|
||||
|
||||
if (yes.equals(request.getParameter("attach")))
|
||||
return new AttachmentForm(sig,conf,msg,target); // go to upload an attachment
|
||||
|
|
|
@ -135,7 +135,7 @@ public class RenderData
|
|||
|
||||
} // end canGZIPEncode
|
||||
|
||||
boolean noSmartTags()
|
||||
public boolean noSmartTags()
|
||||
{
|
||||
return rconf.noSmartTags();
|
||||
|
||||
|
|
|
@ -82,8 +82,9 @@ public class SideBoxConferences implements ContentRender
|
|||
+ rdat.getEncodedServletPath(href) + "\">" + StringUtil.encodeHTML(conf.getName())
|
||||
+ "</A></B> (" + StringUtil.encodeHTML(conf.getEnclosingSIG().getName()) + ")</FONT>\n");
|
||||
if (conf.anyUnread())
|
||||
out.write(" <IMG SRC=\"" + rdat.getFullImagePath("tag_new.gif")
|
||||
+ "\" ALT=\"New!\" BORDER=0 WIDTH=40 HEIGHT=20>\n");
|
||||
out.write(" <A HREF=\"" + rdat.getEncodedServletPath(href + "&rnm=1") + "\"><IMG SRC=\""
|
||||
+ rdat.getFullImagePath("tag_new.gif")
|
||||
+ "\" ALT=\"New!\" BORDER=0 WIDTH=40 HEIGHT=20></A>\n");
|
||||
out.write("</TD>\n</TR>\n");
|
||||
|
||||
} // end while
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
<A HREF="<%= rdat.getEncodedServletPath(path) %>"><%= StringUtil.encodeHTML(data.getConferenceName(i)) %></A> -
|
||||
Latest activity: <%= rdat.getActivityString(data.getLastUpdateDate(i)) %>
|
||||
<% if (data.anyUnread(i)) { %>
|
||||
<IMG SRC="<%= rdat.getFullImagePath("tag_new.gif") %>" ALT=\"New!\" BORDER=0 WIDTH=40 HEIGHT=20>
|
||||
<A HREF="<%= rdat.getEncodedServletPath(path + "&rnm=1") %>"><IMG
|
||||
SRC="<%= rdat.getFullImagePath("tag_new.gif") %>" ALT="New!" BORDER=0 WIDTH=40 HEIGHT=20></A>
|
||||
<% } // end if %>
|
||||
<BR>
|
||||
<% int count = data.getNumHosts(i); %>
|
||||
|
|
Loading…
Reference in New Issue
Block a user