wow that was it. I feel dumb... heh. Yeah I will have to restructure
the code. It's a mess!

Thanks for your help Grant, I appreciate it.

On Jun 3, 8:20 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> Look at your code.  You have:
>
> if ( ... antiflood session set... ){
>   if (... too recent ... ){
>     ... block post
>   } ELSE {   <--- you are missing this
>     .. SUBMIT POST
>   }
>
>
>
> } else {
>   ... submit post
> }
>
> you are just missing the bits in CAPS, the case to submit the post if
> they have previously posted, but it is not recent enough to be
> blocked.  I would recommend you restructure not to have duplicate
> submit code though.
>
> On Jun 4, 9:34 am, chad <[EMAIL PROTECTED]> wrote:
>
> > Hi Grant,
>
> > The query is fine. I can post 1 comment fine.. it inserts to db fine
> > and it sets the session for antiflood just fine. However, i'm not sure
> > on how to handle the checking in the add() action in the comments
> > controller since the comment is being posted from /news/view/$id
>
> > After I post 1 comment, the session sets for antiflood time (which all
> > works) however it's not making it past the initial checking when I try
> > to post a 2nd comment to see if the session is set in the add() action
> > in the comment controller. I'm not sure how to handle this at this
> > point.
>
> > I'm not even sure if i'm going about this the right way.. I thought I
> > was but maybe not.
>
> > On Jun 2, 9:42 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> > > First, you need to be much more succinct in your query.  What doesn't
> > > work?  Does it read the session variable?  Does it read your
> > > "general.comment_floodtime" value?
>
> > > However, the problem just looks like you haven't handled what happens
> > > when they do have a "antiflood" session variable, but it's far enough
> > > in the past not to cause an error.  Shouldn't this then add the
> > > comment?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to