Commit 0f07ed25 authored by mindless_mind's avatar mindless_mind Committed by yukare

Fix for #1319380 by

mindless_mind: Notice: Undefined variable: node_id in lightbox2_field_formatter_view()
parent 4acf3a86
......@@ -4,6 +4,8 @@ description = Enables Lightbox2 for Drupal
core = 7.x
package = User interface
dependencies[] = entity
files[] = lightbox2.install
files[] = lightbox2.module
files[] = lightbox2.formatter.inc
......
......@@ -958,12 +958,7 @@ function lightbox2_field_formatter_view($entity_type, $entity, $field, $instance
$lightbox_style = NULL;
}
if ($entity_type == 'node') {
$node_id = $entity->nid;
}
else {
$node_id = 0;
}
$wrapper = entity_metadata_wrapper($entity_type, $entity);
foreach ($items as $delta => $item) {
$uri = array(
......@@ -977,7 +972,7 @@ function lightbox2_field_formatter_view($entity_type, $entity, $field, $instance
'#image_style' => $image_style,
'#lightbox_style' => $lightbox_style,
'#path' => $uri,
'#node_id' => $node_id,
'#node_id' => $wrapper->getIdentifier(),
'#field_name' => $field['field_name'],
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment