This README is incomplete.
Pessimistic Database Locking
- Version: 0.5
- Author: Scott Tesoriere http://github.com/scottkf/
- Build Date: 2009-06-14
- Download and move the 'pessimistic_db_locking' folder to your Symphony 'extensions' folder.
- Enable it by selecting "Pessimistic DB Locking" in the list and choose Enable from the with-selected menu, then click Apply.
This extension adds row-level, pessimistic (active) locking to symphony. It is automatically added to the backend once installed, and exposes a filter to the frontend that if selected adds the same ability to the front as it does the back.
It works as follows:
- User edits an entry and opens the edit page
- User obtains a lock on the entry, the lock expires after X amount of time (configurable), and renews (via JS) after X amount of time (configurable)
- After successful save, the lock is released OR the lock will be released after X amount of time (like if you went idle on the screen), also configurable
The times are configurable, but only through extension.driver.php currently, newer versions will add preferences.
On the backend
All you have to do is enable the extension, and it works automatically.
On the frontend (using an event filter called 'lock-entry')
This will only work on an event which is being edited, i.e., it has an
If a user tries to save an entry with this event attached, one of the following might result:
<filter name="lock-entry" status="passed" /> <filter name="lock-entry" status="failed">This lease is currently owned by "some authors name".</filter>
This extension is based on many things, including Nick Dunn's Custom Admin extension, GitHub Voice, and Rowan's email template filter extension. Without any of them I would never been able to do this as easily.
- Add preferences for which sections we should lock, and all the timing (how often it renews, how long it lasts, when it permanently expires)
- Add an unload event to release the entry
June 14th, 2009
- Finished the frontend filter, how to use is available above
June 12th, 2009
- Added check for locks on pre entry creation
- Remove the lock on post entry creation)