I am looking at the upgrade path for this right now and I am seeing that
some comments have approved=0, spam=0, and pending=0, which I guess
means that it's a comment that the blog owner just doesn't want to honor
for some reason? I am planning to call this state, UNAPPROVED, but just
wanted to make sure this is a valid status that we want to continue
supporting.
-- Allen
Dave wrote:
+1 to that as well. Good idea.
- Dave
On 1/9/07, Allen Gilliland <[EMAIL PROTECTED]> wrote:
This is another very short proposal which I'll just do on the list.
Currently, the roller_comment table has 3 boolean columns for approved,
spam, pending which identify the state of the comment. This ends up
causing a bit of extra work and confusion because you have to set
multiple flags on a comment to properly identify it's state rather then
simply choosing a single status flag. I'd like to fix this so that
comments use a status column like the one used for weblog entries. The
benefits are that 1) it's easier to manage what state a comment is in
and 2) it will improve query performance for comments.
1. it's easier to manage because instead of having to mark a comment
with pending=true and approved=false to make it a comment awaiting
moderation, you would instead simply set status=PENDING. this is easier
and more extensible then the current solution.
2. on a more useful note, this will improve query performance.
currently queries against the comment table require many columns of
criteria to get the proper result set, i.e. approved=true and spam=false
and pending=false. with this change all those criteria will be
consolidated into a single criteria for status=XXXX which will make
queries shorter, faster, and easier to index for.
The process for making this change is easy enough ...
1. add a new status column to the comment table and attribute to the
CommentData pojo.
2. add a couple lines to the sql upgrade script to properly set the
status column during upgrades.
3. update the comment/trackback servlets and comment management struts
actions to use the new status field instead of all the old boolean
fields to manage comment status.
The statuses will be ...
APPROVED - valid comment for display on weblog
SPAM - considered spam, not available for display on weblog
PENDING - awaiting moderator approval, not considered spam
everyone okay with this? any objections?
-- Allen