> We are using elog as a small database system, today we came across a
> problem where 2 people were editing the same record and the first one to
> submit his changes were overwritten when the second person submitted his.
>
> Is there anyway to lock a logbook record when someone has pressed EDIT,
> maybe set a flag in the logbook entry so it has to be unlocked when its
> submitted by the originator or by an administrator.
I added some code experimentally to avoid double editing. Whenever a message
is edited, a "stop" sign is displayed in the message list next to the edited
messages and a warning is issued on the single message display page. If the
original editing has been given up (browser closed) one can just ignore this
message. I prefer this solution in comparision with a real locking, since
the mechanisms for unlocking a stale message by the administrator is not
necessary. Get the newest code from CVS, get also themes/default/stop.gif to
display the stop sign, and let me know what you think. |