Welcome Guest, Not a member yet? Register   Sign In
prevent multiple simultaneous page editors
#2

[eluser]jedd[/eluser]
[quote author="MaxPar" date="1236607109"]
My current best guess is that I should keep track of all the pages that are being edited (in a database, with three columns: page name, time started editing and user cookie info). Every time someone wants to edit a page, I check to make sure it isn't already open in the database.[/quote]

There are obvious problems with this one - the call to check if the page is locked and if not to edit it needs to be atomic. Doable, but something that requires some care.

The big problem is working out when someone's buggered off mid-edit, leaving your page locked - and some automatic, periodic mechanism to reset that flag so the page can be edited again.

If you look at how most CMS's do it, they force the problem back onto the user - whenever a user saves changes to the page, the state of the page is checked to see if it was modified since that user started the edit. If it was, then the delta view of the pages is shown, and the user has to clean it up. This is not necessarily the best approach, but presumably the easiest (because most CMS's adopt it).


Messages In This Thread
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 02:58 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 05:14 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 05:37 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 05:46 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 05:54 AM
prevent multiple simultaneous page editors - by El Forum - 03-09-2009, 06:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB