Closed (fixed)
Project:
Checkout (Content locking)
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
24 Apr 2008 at 18:27 UTC
Updated:
31 Jul 2008 at 04:46 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedHmm, I guess two weeks of silence is kind of a "quite small" ? :-)
Comment #2
AaronCollier commentedMarked #255226: for drupal 6.* ? as a duplicate.
Comment #3
joel_guesclin commentedTry asking jgraham, I believe he uses the module. I am not actively maintaining it myself. Sorry I can' t be more help.
Comment #4
Anonymous (not verified) commentedDon't mind ;-) I just finished the patch for making it work in 6.x this afternoon. I hope someone will test it as it seems the demand for a 6.x version is quite small (I don't get it...how can anyone seriously work without it? :-))
The patch is against checkout-5.x-2.x-dev.tar.gz from March 27, 2008.
Apart from changing the code to reflect the new api, I also added a check for 'validate' in nodeapi, i.e., before a node should be saved. We must check if we still have the lock, because it could happen that someone starts editing a node and then goes out for lunch for some hours.
Now cron might remove the lock in the meantime and user 2 might start editing. But if user 1 returns from lunch and saves the node, it will succeed and user 2 will get a "content has been modified, cannot save" although he has the lock. With the new check, user 1 will be informed if someone else is currently editing (could still happen that user 2 aborts his edit so that user 1 can finally save) or if the node has been changed in the meantime. If the lock was just lost without anyone else changing or locking the node, the lock can be regained to save the changes.
Comment #5
smk-ka commentedThanks, Frank, for making the first move! I'm unfortunately bound in a large project (still on D5), nevertheless I've happily reviewed your patch and fixed a couple of things:
- Removed menu titles from callback menu items (useless because never shown).
- Removes t() calls from menu titles (now automatically translated by the menu system).
- Fixed release link not displayed if the node is locked by the same user (in checkout_node()).
- Slightly simplified nodeapi('validate') (removed a rather odd error message).
- Updated hook_help to D6.
- Changes to wording (since D6, we don't say 'cron' and 'node' to our beloved users anymore).
- Fixes to coding standards.
Patch is untested, though, and .info file has been intentionally left out (use from Frank's patch or edit yourself).
Comment #6
Anonymous (not verified) commentedHi smk-ka,
sorry for those things, I guess you can see that I don't have that much experience in drupal coding :-) I learn most of the things from looking at other modules. I will learn about the coding standards!
I will test your patch, thank you!
Comment #7
Anonymous (not verified) commentedYour version works fine for me!
Comment #8
joel_guesclin commentedWould someone like to take the completed D6 code and make a D6 version for publication and download?
Comment #9
smk-ka commentedDone.
Comment #10
Anonymous (not verified) commentedGreat, thanks!
Comment #11
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.