diff --git a/lightbox2.module b/lightbox2.module
index ea5643e630e98870baa26e3a9d0a52512104afa4..3c276339d475850e74964e819e3cbdaff97d962e 100644
--- a/lightbox2.module
+++ b/lightbox2.module
@@ -875,6 +875,7 @@ function lightbox2_field_formatter_settings_form($field, $instance, $view_mode,
return $form;
}
+
/**
* Implements hook_field_formatter_settings_summary().
*/
@@ -888,19 +889,26 @@ function lightbox2_field_formatter_settings_summary($field, $instance, $view_mod
$summary = '';
- if(isset($settings['caption']) && isset($settings['type']) && isset($settings['image_style']) && isset($settings['lightbox_style'])) {
- $summary .= ''.t('Caption field') . ': ' . $fields[$settings['caption']] . '
';
- $summary .= ''.t('Display') . ': ' ;
+ if (!isset($image_styles[$settings['image_style']])) {
+ $image_styles[$settings['image_style']] = 0;
+ }
+ if (!isset($image_styles[$settings['lightbox_style']])) {
+ $image_styles[$settings['lightbox_style']] = 0;
+ }
+
+ if (isset($settings['caption']) && isset($settings['type']) && isset($settings['image_style']) && isset($settings['lightbox_style'])) {
+ $summary .= '' . t('Caption field') . ': ' . $fields[$settings['caption']] . '
';
+ $summary .= '' . t('Display') . ': ';
$summary .= $types[$settings['type']];
$summary .= ': ';
$summary .= $image_styles[$settings['image_style']];
$summary .= ' => ';
$summary .= $image_styles[$settings['lightbox_style']];
- } else {
+ }
+ else {
$summary = 'Title - Lightbox: original => original';
}
-
return $summary;
}