RE: [PHP] lock web page when editing

From: Date: Sat, 29 Sep 2001 21:54:08 +0000
Subject: RE: [PHP] lock web page when editing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69322@lists.php.net to get a copy of this message
Another possibility: 1. keep track of the last modification time for that page when a user requests to start editing the page 2. lock the page only immediately before the script does the write and then unlock it immediately after. (that way a file never is left locked) 3. don't allow the write to happen if the last modification time is different from the time when the user started applying edits. (If it's different then that means there was an update since that user started applying her edits. If that's the case, you would prompt the current user that there has been an update since she started making the changes and that she needs to reload the page being modified to before she can apply those changes.) --- And yet another approach is to put the pages (if just files) into CVS and have the content management scripts be a UI to the CVS commands used to manage those files. I've implemented this approach for a customer and it works nicely. CVS allows locking or merging options depending on how strict you want to be. If curious about CVS, check out http://www.cvshome.org/. -Joe > -----Original Message----- > From: Bob [mailto:whyisityou2@yahoo.com] > Sent: Saturday, September 29, 2001 2:28 PM > To: php-general@lists.php.net > Subject: [PHP] lock web page when editing > > > hi > > just seeing how everyone would approach this problem. > > i'm building a content management system and many people can > edit a web > page. if someone clicks on "edit" for a web page then i want to lock > that page and not allow anyone else to "edit" the same page until the > first person is done. how would i be able to tell if that > first person > is still editing or they have left??? if they close the browser then > the web page would be locked forever. how do i get around that? > > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#69322) next »