Closed (fixed)
Project:
Node Relativity
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2011 at 11:42 UTC
Updated:
14 Jul 2011 at 18:02 UTC
In the relativity_nodeapi function, the following code checks the weighting setting and user access level for relativity link operations before theming that section and adding it to the node content array:
// output links to attach allowed children types and remove existing children
if ($w = variable_get('relativity_'. $node->type .'_operations_weight', 12) && user_access('view link operations')) {
$node->content['relativity_operations'] = array(
'#value' => theme('relativity_show_link_operations', $node),
'#weight' => $w,
);
}
It seems that the 'if' statement sets the variable $w to True, rather than a weight as intended, so on my site the link operations section is always displayed at the top of the page. Change the 'if' statement to the following fixes it for me:
if (($w = variable_get('relativity_'. $node->type .'_operations_weight', 12)) && user_access('view link operations')) {
...
}
Comments
Comment #1
jtbayly commentedYep. I had that problem too. This patch fixed it up. Thanks.
Comment #2
jonhattanCommitted. Thanks.