Murray @ PlanetThoughtful wrote:
I've recently been working on building my own wiki engine for my blog
site. While the majority of the engine is complete, a remaining concern
I have is how to handle competing edits (ie when two or more people are
editing the same wiki page simultaneously).
I'm wondering if anyone else on the list has given this some thought?
How would / do you handle competing edits to the same entry in a wiki
application?
Just like Wikipedia -- that is, send a timestamp in a hidden form field
with the edit box. When the form is submitted, throw an error if there
is an edit more recent than that timestamp (an "edit conflict").
If your pages have sections, like Wikipedia's, then you can configure
your software to only throw an error if there is an edit conflict with
that section.
Also, it's probably a good idea to make use of transactions in an
ACID-compliant storage engine like MySQL's InnoDB, if possible.
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php