Closed (fixed)
Project:
Node access node reference
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jun 2012 at 10:03 UTC
Updated:
6 Jul 2012 at 11:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
danielb commentedsomething weird about that patch, I think you patched it against your own previous code
I'd prefer not to use the initialize function and just put !empty() or isset() in the right spots
Comment #2
aheredia commentedThe problem is that isset or !empy only checks but does not initialize the indexes that must be passed to
And the call to this function should be done to apply NANR
Is that correct? or i'm wrong
Comment #3
danielb commentedit can be handled inline with a ternary statement
Comment #4
danielb commentedhow about this?
Comment #5
aheredia commentedOk i'll try to do it that way
Comment #6
danielb commentedor i guess technically if we're passing an empty array() into those.. they won't do anything? so we could just wrap the whole call in an if-statement
Comment #7
johnvHow about this change in nodeaccess_nodereference_add_grant():
The error in
if ($data['unused'] && isset($data['referenced']))can be prevented in my comment-to-be in #1619636: Cumulative settings improvements and fixes.Comment #8
danielb commentedYou mean in addition to the other changes?
I presume the issue is the function call.
Comment #9
johnvIMO, OP's error will not occur with the new 'minified' variable from the new version.
However, you will only get this data-structure when you change, save, change-back, save-again. Which is undoable.
Or apply the hook_N_update() function in the other issue.
Comment #10
aheredia commentedI think patch #4 works and is a good aproach.
I don't understand #6. Do you mean an if statement to call or not to call nodeaccess_nodereference_add_grant function ???. This function should be always called.
Comment #11
danielb commentedIf the 4th param $settings is empty that function effectively does nothing. It just sets a dummy grant with 0 for everything, which is meaningless.
Comment #12
danielb commentedAlso I think your comment #2 is wrong,
$data['referenced'][$operation]is always going to be there if that bit of code is run, since the iterations of the foreach are based on the keys of the array, so I won't do anything about that.Comment #13
danielb commentedComment #14
danielb commentednope, this one
Comment #15
danielb commentedi've committed that, i guess we can go from there if there is a prob, till then marking as fixed