Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_disp.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_disp.php	(revision 856)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_disp.php	(revision 860)
@@ -34,5 +34,5 @@
 		$xoops_db->query( "UPDATE ".get_xoops_prefix() . $dir_name."_forums SET forum_external_link_format='".$external_link_format."' WHERE forum_id= $forum_id" ) ;
 		
-		$d3comment =& new xpressD3commentContent( $dir_name , $xpress_dirname ) ;
+		$d3comment = new xpressD3commentContent( $dir_name , $xpress_dirname ) ;
 
 		$post_title = get_the_title();
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 856)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php	(revision 860)
@@ -486,5 +486,5 @@
 				$wp_res = 	$xoops_db->query($wp_sql);
 				if ($wp_res === false) die( '...Err. INSERT' . $wp_comments . '(' . $wp_sql . ')');
-				$comment_ID = mysql_insert_id();
+				$comment_ID = $xoops_db->insert_id;
 				$wp_sql  = "UPDATE $wp_posts SET  comment_count = comment_count +1 WHERE ID = $comment_post_ID";
 				$xoops_db->query($wp_sql);
@@ -696,5 +696,5 @@
 			$sql = "INSERT INTO ".$d3f_posts." SET $set4sql,pid=$reply_pid,topic_id=$topic_id,post_time=$post_time,poster_ip=$poster_ip";
 			$xoops_db->query($sql) ;
-			$post_id = mysql_insert_id();
+			$post_id = $xoops_db->insert_id;
 			wp_d3forum_sync_topic( $d3forum_dirname , $topic_id ) ;
 			
@@ -729,9 +729,9 @@
 			$sql = "INSERT INTO ".$d3f_topic." SET forum_id=$forum_id,topic_invisible=$topic_invisible,topic_external_link_id='".addslashes($topic_external_link_id)."'";
 			$xoops_db->query($sql) ;
-			$topic_id = mysql_insert_id();
+			$topic_id = $xoops_db->insert_id;
 			// create post in the topic
 			$sql = "INSERT INTO ".$d3f_posts." SET $set4sql,topic_id=$topic_id,post_time=$post_time,poster_ip=$poster_ip";
 			$xoops_db->query($sql) ;
-			$post_id = mysql_insert_id();
+			$post_id = $xoops_db->insert_id;
 			wp_d3forum_sync_topic( $d3forum_dirname , $topic_id , true , true ) ;
 			
@@ -1054,5 +1054,5 @@
 	}
 
-	$xoops_db->query( "INSERT INTO ".$d3forum_prefix."post_histories SET post_id=$post_id, history_time=UNIX_TIMESTAMP(), data='".mysql_real_escape_string( serialize( $data ) )."'" ) ;
+	$xoops_db->query( $xoops_db->prepare( "INSERT INTO ".$d3forum_prefix."post_histories SET post_id=$post_id, history_time=UNIX_TIMESTAMP(), data=%s", serialize( $data ) ) ) ;
 }
 
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/user_sync_xoops.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/user_sync_xoops.php	(revision 856)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/include/user_sync_xoops.php	(revision 860)
@@ -267,5 +267,5 @@
 				$wu_sql .=		" , '$user_regist_time', $user_status, '$user_display_name')";
 				$xoops_db->query($wu_sql);
-				$wp_user_id = mysql_insert_id();
+				$wp_user_id = $xoops_db->insert_id;
 			} else {	 // WP User ID has not been used yet. 
 				$wu_sql  =	"INSERT INTO $db_xpress_users ";
Index: trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php
===================================================================
--- trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 856)
+++ trunk/xpressme_integration_kit/wp-content/plugins/xpressme/xpressme_class.php	(revision 860)
@@ -367,5 +367,5 @@
 		$sql .=    "('$cat_id', '', '$title','a:0:{}')";
 		$xoops_db->query($sql);
-		$insert_forum_id = mysql_insert_id();
+		$insert_forum_id = $xoops_db->insert_id;
 		$sql  = "INSERT INTO $d3forum_forum_access_tbl ";
 		$sql .=    "(forum_id, groupid, can_post, can_edit, can_delete, post_auto_approved, is_moderator) ";
