You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by tel85237701 <te...@126.com> on 2007/09/08 16:49:43 UTC
How fix the delete comment bug in roller ver.2.0
Hi gurus!
I have a customized version of roller, it is difficult to update to new
version,
So I want to fix the error in this version. Please help.
I think there is a error in file WeblogEntryFormAction.java
//-----------------------------------------------------------------------
/**
* Update selected comments: delete and/or mark as spam.
*/
public ActionForward updateComments(
ActionMapping mapping,
ActionForm actionForm,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
ActionForward forward = mapping.findForward("weblogEdit.page");
ActionErrors errors = new ActionErrors();
RollerRequest rreq = RollerRequest.getRollerRequest(request);
RollerSession rollerSession =
RollerSession.getRollerSession(request);
try
{
WeblogEntryData wd = rreq.getWeblogEntry();
if ( rollerSession.isUserAuthorizedToAuthor(wd.getWebsite()))
{
if (wd == null || wd.getId() == null)
{
ResourceBundle resources = ResourceBundle.getBundle(
"ApplicationResources", request.getLocale());
request.setAttribute("javax.servlet.error.message",
resources.getString("weblogEntry.notFound"));
forward = mapping.findForward("error");
}
.......
But ho to fix it?
Xing
========================
tel.: 010-85237701 13910010327
wanxiang.xing@cycnet.com
Re: How fix the delete comment bug in roller ver.2.0
Posted by Dave <sn...@gmail.com>.
On 9/8/07, tel85237701 <te...@126.com> wrote:
> Hi gurus!
> I have a customized version of roller, it is difficult to update to new
> version,
> So I want to fix the error in this version. Please help.
>
>
> I think there is a error in file WeblogEntryFormAction.java
> //-----------------------------------------------------------------------
> /**
> * Update selected comments: delete and/or mark as spam.
> */
> public ActionForward updateComments(
> ActionMapping mapping,
> ActionForm actionForm,
> HttpServletRequest request,
> HttpServletResponse response)
> throws IOException, ServletException
> {
> ActionForward forward = mapping.findForward("weblogEdit.page");
> ActionErrors errors = new ActionErrors();
> RollerRequest rreq = RollerRequest.getRollerRequest(request);
> RollerSession rollerSession =
> RollerSession.getRollerSession(request);
> try
> {
> WeblogEntryData wd = rreq.getWeblogEntry();
> if ( rollerSession.isUserAuthorizedToAuthor(wd.getWebsite()))
> {
> if (wd == null || wd.getId() == null)
> {
> ResourceBundle resources = ResourceBundle.getBundle(
> "ApplicationResources", request.getLocale());
> request.setAttribute("javax.servlet.error.message",
> resources.getString("weblogEntry.notFound"));
> forward = mapping.findForward("error");
>
> }
> .......
> But ho to fix it?
What are the steps to reproduce the error?
What, if any, exception is thrown?
- Dave