- Timestamp:
- Mar 15, 2009, 10:29:28 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/plugins/xpressme/include/d3forum_comment_synchro.php
r106 r108 179 179 180 180 // All comments of WordPress are exported to the D3Forum comment. 181 function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum' ,$wp_prefix = 'wp'){181 function wp_to_d3forum($forum_id = 1, $d3f_prefix = 'd3forum'){ 182 182 global $XPressME,$xoops_db; 183 183 … … 185 185 186 186 $d3forum_prefix = get_xoops_prefix() . $d3f_prefix . '_'; 187 $xpress_prefix = get_ xoops_prefix() . $wp_prefix . '_';187 $xpress_prefix = get_wp_prefix(); 188 188 189 189 $wp_comments = $xpress_prefix . 'comments'; … … 239 239 240 240 $comment_count = 0; 241 $comments = $xoops_db->get_results($ post_sql);241 $comments = $xoops_db->get_results($sql); 242 242 foreach($comments as $comment){ 243 243 $comment_ID = $comment->comment_ID; … … 253 253 254 254 // All comments of D3Forum are import to the WordPress comment. 255 function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum' ,$wp_prefix = 'wordpress'){255 function d3forum_to_wp($forum_id = 1, $d3f_prefix = 'd3forum'){ 256 256 global $XPressME,$xoops_db; 257 257 if (!is_d3forum_setting()) die('The setting of the D3Forum comment integration is wrong. '); 258 258 259 259 $d3forum_prefix = get_xoops_prefix() . $d3f_prefix . '_'; 260 $xpress_prefix = get_ xoops_prefix() . $wp_prefix . '_';260 $xpress_prefix = get_wp_prefix() ; 261 261 262 262 $wp_comments = $xpress_prefix . 'comments'; … … 297 297 298 298 $d3f_res = $xoops_db->get_results($d3f_sql); 299 if (empty($d3f_res )) die( '...Err. OPEN D3Forum Data (' . $d3f_sql . ')');300 299 $import_count = 0; 301 300 foreach($d3f_res as $d3f_row){ … … 429 428 $wp_sql .= "($comment_ID, $post_id)"; 430 429 $xoops_db->query($wp_sql); 431 if ($comment_approved ==0) do_CommentWaiting($comment ID, $post_id);430 if ($comment_approved ==0) do_CommentWaiting($comment_ID, $post_id); 432 431 break; 433 432 case 'edit':
Note: See TracChangeset
for help on using the changeset viewer.