--- content_profile_registration.module	2008-09-29 13:21:22.000000000 +0100
+++ content_profile_registration.module	2008-10-13 13:24:35.828148800 +0100
@@ -155,9 +198,18 @@
       node_save($node);
       // Give us a nice log message.
       if ($node->nid) {
-        watchdog('content', t('Content Profile: added %user %type upon registration.', array('%user' => $node->name, '%type' => $type)), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
+	$drupal_ver = VERSION;
+	switch ($drupal_ver[0]) {
+	    case 5:
+		watchdog('content', t('Content Profile: added %user %type upon registration.', array('%user' => $node->name, '%type' => $type)), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
+		break;
+	    case 6:
+		watchdog('content', t('Content Profile: added %user %type upon registration.', array('%user' => $node->name, '%type' => $type)), NULL, WATCHDOG_NOTICE, l(t('view'), "node/$node->nid"));
+		break;
+	}
       }
     }
+   }
   }
 }
 

