? 934676-image_caption-pannels-support.patch
Index: image_caption.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image_caption/image_caption.module,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 image_caption.module
--- image_caption.module	21 Aug 2008 07:47:05 -0000	1.2.2.1
+++ image_caption.module	7 Oct 2010 14:46:05 -0000
@@ -49,15 +49,16 @@ function image_caption_admin_settings() 
 }
 
 /*
-* Implementation of hook_nodeapi()
+* Implementation of hook_init()
 * On view, add captioning javascript to page for certain node types
 */
-function image_caption_nodeapi(&$node, $op) {
-  
-  if ($op == 'view') {
+function image_caption_init() {
+  if (arg(0) == 'node' && is_numeric(arg(1)) & !arg(2)) {
+    $node = node_load(arg(1));
     if (in_array($node->type, variable_get('image_caption_node_types', array()))) {  
       $path = drupal_get_path('module', 'image_caption');
       drupal_add_js($path.'/image_caption.js','module', 'header');
     }
   }
 }
+
