I'm hooking this function for all purposes, and that value is still 0
even when the comment is updated via the admin panel

Admin Panel -> Comments -> [select status 'approved' mark as
'unapproved']

On Jun 5, 3:21 pm, rick c <[email protected]> wrote:
> Realpolitk,
>
> See starting around line 163 of feedbackhandler.php. That is where
> comments generally get inserted into the database. As you can see,
> unless the commenter is logged in, the comment is given a status of
> Comment::STATUS_UNAPPROVED, which is defined as zero in commment.php.
>
> Rick
>
> On Jun 5, 4:41 am, Realpolitik <[email protected]> wrote:
>
>
>
> > I'd like to hook this function with act_comment_update_status, so that
> > when a comment's status is changed, I can perform a specific action.
> > However, it is important to know what the comment's original and
> > current/future status will be.
>
> > I receive $comment = $this, $field_value = $this->fields[$fieldname],
> > and $new_value = $value from the call to my hook, but this doesn't
> > seem to help me when comments are moderated via the admin panel.
>
> > $comment->status is always the new status
> > $field_value is always zero and
> > $value is always the new status
>
> > Why is $this->fields[$fieldname] (where $fieldname == status) always
> > zero when Plugins::act('comment_update_' . $fieldname, $this, 
> > $this->fields[$fieldname], $value); is called when moderating comments in
>
> > the admin panel?
>
> > I know this same end-goal can be accomplished via
> > "act_admin_moderate_comments" but I'd like to know why it doesn't work
> > with act_comment_update_{$name}
--~--~---------~--~----~------------~-------~--~----~
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/habari-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to