#1062228: Fix undefined variable formatters in hook_field_formatter_info.
authorFredrik Jonsson
Tue, 15 Feb 2011 17:59:42 +0000 (17:59 +0000)
committerFredrik Jonsson
Tue, 15 Feb 2011 17:59:42 +0000 (17:59 +0000)
colorbox.module

index a23d836..18b9355 100644 (file)
@@ -344,17 +344,13 @@ function colorbox_link_alter(&$links, $node) {
  * Implementation of hook_field_formatter_info().
  */
 function colorbox_field_formatter_info() {
-  if (module_exists('image')) {
-    $formatters = array(
-      'colorbox' => array(
-        'label' => t('Colorbox'),
-        'field types' => array('image'),
-        'settings' => array('colorbox_node_style' => '', 'colorbox_image_style' => ''),
-      ),
-    );
-  }
-
-  return $formatters;
+  return array(
+    'colorbox' => array(
+      'label' => t('Colorbox'),
+      'field types' => array('image'),
+      'settings' => array('colorbox_node_style' => '', 'colorbox_image_style' => ''),
+    ),
+  );
 }
 
 /**