Active
Project:
AD Gallery
Version:
6.x-1.9
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2010 at 18:30 UTC
Updated:
10 Nov 2010 at 18:30 UTC
When a node is being viewed, being that the ad_gallery module uses arg(1) to know what node to node_load(), if fails when the node is referenced like in nodereference CCK.
Being that I sometimes refer to nodes via CCK and display in full, this causes a problem.
To resolve I added an additional method for the NID to be found when missing:
ad_gallery.theme.inc:25
$gallery = node_load(arg(1));
if(!$gallery) $gallery = $vars['element']['#node'];