Needs work
Project:
Project
Version:
7.x-2.x-dev
Component:
Projects
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
28 May 2011 at 15:18 UTC
Updated:
31 Dec 2018 at 11:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dwwSeems weird to have a hook_project_maintainer_new() vs. hook_project_maintainer_save(). So, both hooks are called on new maintainers, while only the 2nd is called on update?
I'd rather:
A) Remove _save(), add both _add() and _update() hooks, and only invoke the right hook on the right operation. This would be in line with the D7 node API. This is what we had originally before we merged the two hooks into one. ;) See #69556-25: move "cvs access" tab into project, make it generic and the next few comments.
or perhaps:
B) Just add an $operation argument to the existing hook to specify 'add' vs. 'update' (like D6's hook_nodeapi).
Sure, either one breaks the existing API, but I'd rather break it and make it sane (before the 6.x-1.0 release) than leave it inconsistent and not providing enough information to be useful.
Comment #2
cvangysel commentedNew patch using your first proposal attached.
Comment #3
avpadernoSince the version for Drupal 6 is not supported anymore, this should eventually be considered for Drupal 7, even though this is an API break.
Comment #4
avpadernoThe provided patch doesn't apply to the Drupal 7 branch.