Closed (fixed)
Project:
Comment Revisions
Version:
5.x-0.1-beta1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
12 May 2008 at 14:48 UTC
Updated:
27 Jun 2008 at 19:02 UTC
if I create a comment, which says "original"
edit it, change text to "second",
edit it, change text to "third",
I'd expect havign a list of revisions with
third
second
original
But, "original" is not in that list. Is it lost?
The user has the permission "force revision", nothing else from that module.
Comments
Comment #1
LasseP commentedGot it.
Will work on that at the end of the week.
I've also set up a demonstration site for testing. http://sandbox.gooseberrycorps.com
Comment #2
LasseP commentedSave the originial comment in the database and allow it to be used like other revisions.
Comment #3
LasseP commentedOk, at the moment, the module just creates a revision of a comment if it is edited, to save database space.
The problem is, the comment module saves the new information before the hook_comment is called.
That means, on "update" the edited comment is already in the {comments} database.
To get the values, the original comment need to be saved right after creation. And that would mean, that every comment is in the database two times.
Anyone got an idea how to prevent that?
Comment #4
maulwuff commentedhmm, first I thought, what about hook_edit, but we are on comments here :)
what about hook_comment with $op ="form" ? we could save a copy to the rev table when the form is shown. Don't know if this makes sense.
Comment #5
LasseP commentedI tried all hook_comment operations, and i finaly choosed the "validation" operation.
This means, that if the validation fails, the original version gets saved, even if the comment is not updated, but if someone tries to send a comment, and it fails, he will possibly try it again. So this database space is not worthless.
Will commit the new features in a few minutes.
Comment #6
LasseP commentedComment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.