Index: /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php
===================================================================
--- /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php	(revision 594)
+++ /trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php	(revision 595)
@@ -187,4 +187,6 @@
 function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum'){
 	global $xpress_config,$xoops_db,$wpdb;
+	global $blog_id;
+	if (empty($blog_id)) $blog_id =1;
 
 	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
@@ -236,5 +238,5 @@
 	
 	//All the records in the wp_d3forum_link table are deleted.  
-	$xoops_db->query("DELETE FROM $wp_d3forum_link WHERE 1");
+	$xoops_db->query("DELETE FROM $wp_d3forum_link WHERE blog_id = $blog_id");
 
 	//The comment is copied from the wordpress comment.
@@ -261,4 +263,6 @@
 function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum'){
 	global $xpress_config,$xoops_db,$wpdb;
+	global $blog_id;
+	if (empty($blog_id)) $blog_id =1;
 	if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. ');
 	
@@ -289,5 +293,5 @@
 	$xoops_db->query("DROP TABLE $wp_dummy");
 	//All the records in the wp_d3forum_link table are deleted.  
-	$xoops_db->query("DELETE FROM $wp_d3forum_link WHERE 1");
+	$xoops_db->query("DELETE FROM $wp_d3forum_link WHERE  blog_id = $blog_id");
 
 	//All wp post comment count clear
