if i understand you good....then...do this: when x user click into "edit post" link, save into database in this post that post is locked (eg locked = 1) and which time it was locked (lockedtime = with date function()), then give an x user idk, about 15 minutes to edit post, and after he press "Save", set locked = 0 and lockedtime = 0
how to check now...y user want to press "edit" and if x user is still inside this 15 minutes than y user should get an error, if time is more than 15 minutes, don't look at status (locked or not) allow him to edit -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/3/14 Sarpidon <[email protected]> > Ok. I guess I am looking for Optimistic Locking, > > has this been implemented on CakePHP? Anyone? > > Thanks > > On Mar 14, 2:50 pm, Sarpidon <[email protected]> wrote: > > Hi, I tried searching for it but I cannot find anything useful. I am > > trying to lock a page that is being edited by another user. In our > > site there could be many admins editing the frontpage (choosing main > > articles and so on), I want to be able to restrict the page to be > > edited by a single user every time (and display a message to users > > that are trying to edit the particular page . e.g. - This page is > > being edited by user XXXX please try again later). > > > > Is there a preferable approach to something like this? > > > > I guess I could store a cookie when the page is "open" and "closed" > > but I am not sure how many things I have to take into consideration. > > > > Any help will be appreciated. > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group > at http://groups.google.com/group/cake-php > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
