Modules that wish to extend clone access with the clone_access_alter hook are not implemented due to the $access variable not being updated. The attached patch fixes this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| clone_access-patch.txt | 464 bytes | v1nce |
Modules that wish to extend clone access with the clone_access_alter hook are not implemented due to the $access variable not being updated. The attached patch fixes this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| clone_access-patch.txt | 464 bytes | v1nce |
Comments
Comment #1
pwolanin commentedThe function signature for _alter hooks is that the first param is passed by reference. Did you implement your hook as such?
Comment #2
v1nce commentedYes, but your code is not updating the $access variable within the clone_access() function. See the node.module example code:
$result variable is updated with the return value from hook_nodeapi.
Comment #3
pwolanin commentedThis is an _alter hook like hook_form_alter - there is not expected to be a return value. You need to declare the first parameter as passed by reference.
compare function clone_access($node):
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/node_clone/...
with:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/node_clone/...
where I use the 6.x drupal_alter() API function.
Comment #4
v1nce commentedUnderstood. Thank you.