Closed (fixed)
Project:
Documentation
Component:
Developer Guide
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
21 Feb 2006 at 22:52 UTC
Updated:
10 Mar 2006 at 06:30 UTC
Jump to comment: Most recent file
I was looking information on the revision system when I came across a comment from someone confused by the changes. In there they asked for node_example.module to be updated to demonstrate revisions. Thinking that was a good idea I started on it.
In the process I realized that it was kind of kludgy that you had to implement hook_nodeapi() to delete revisions. I'm working on a patch for that so I'm putting this aside for the moment.
Attached is a patch that adds revision support EXCEPT for deleting a single revision.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | node_example.module_revisions_1.patch | 5.79 KB | drewish |
| #2 | node_example.module_revisions_0.patch | 5.75 KB | drewish |
| node_example.module_revisions.patch | 3.54 KB | drewish |
Comments
Comment #1
drewish commentedi've opened an issue to add a hook_delete_revision(): http://drupal.org/node/50627
Comment #2
drewish commentedi finished up the patch, adding an implementation of hook_nodeapi(op=delete revision). please review the changes.
Comment #3
drewish commentedon irc, killes suggested that nid be indexed. rather than provide separate mysql/pgsql schemas i've just made vid, nid a joint primary key.
i should also mention, i've upated quite a bit of other code in the module to follow the current practices in core (with the exception of the long forms format). like, removing the hook_link implementation as it's handled by tabs now.
Comment #4
drewish commentedi'm going to go ahead an commit this.
Comment #5
(not verified) commented