Needs review
Project:
Reply
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2014 at 19:47 UTC
Updated:
27 Oct 2014 at 23:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
larowlanComment #2
idebr commentedWhat exactly is the use of 'locking' a reply bundle?
Comment #3
larowlanLooks to be related to features integration, but seems to be borrowed from the node-type logic - which also has the concept of locked.
Either way I think that using hook_init() is the wrong approach
Comment #4
idebr commentedI dated this hook back to 2012-02-05. The original commit message 'lalala' is not very helpful either: http://cgit.drupalcode.org/reply/commit/reply.module?id=db507297cc869225...
I would argue this hook is counterproductive. In a development environment where a reply bundle would be added through code for example using the Features module (reply_bundle.locked = 1), administrators would be unable to edit the reply bundle unless they have the original database in which the reply bundle was added. Considering this module is officially still in alpha, is removing the reply_init() a valid option in your opinion?
Attached a proposed patch
Comment #5
larowlanI agree lalalala isn't much help :(
What happens if you save/edit a locked bundle with this patch? Does it blow up in your face?
I wonder why the bundles weren't made ctools exportables.
Comment #6
idebr commentedWhen a user saves/edits a locked bundle, the reply_bundle.status is updated to the 'Overridden' status and the bundle is saved to the database.
In the default behavior for locked bundles, for example Node types, the only thing that is different when a bundle is locked is there is no more 'delete' link available in the bundle admin ui.