411 $name = $wpdb->escape(csc ($comment_auteur)); |
411 $name = $wpdb->escape(csc ($comment_auteur)); |
412 $email = $wpdb->escape($comment_email); |
412 $email = $wpdb->escape($comment_email); |
413 $web = "http://".$wpdb->escape($comment_site); |
413 $web = "http://".$wpdb->escape($comment_site); |
414 $message = $wpdb->escape(textconv ($comment_content)); |
414 $message = $wpdb->escape(textconv ($comment_content)); |
415 |
415 |
416 if($cinfo = comment_exists($name, $comment_dt)) |
416 $comment = array( |
417 { |
|
418 // Update comments |
|
419 $ret_id = wp_update_comment(array( |
|
420 'comment_ID' => $cinfo, |
|
421 'comment_post_ID' => $comment_post_ID, |
417 'comment_post_ID' => $comment_post_ID, |
422 'comment_author' => $name, |
418 'comment_author' => $name, |
423 'comment_author_email' => $email, |
419 'comment_author_email' => $email, |
424 'comment_author_url' => $web, |
420 'comment_author_url' => $web, |
425 'comment_author_IP' => $comment_ip, |
421 'comment_author_IP' => $comment_ip, |
426 'comment_date' => $comment_dt, |
422 'comment_date' => $comment_dt, |
427 'comment_date_gmt' => $comment_dt, |
423 'comment_date_gmt' => $comment_dt, |
428 'comment_content' => $message, |
424 'comment_content' => $message, |
429 'comment_approved' => $comment_approved) |
425 'comment_approved' => $comment_approved); |
430 ); |
426 $comment = wp_filter_comment($comment); |
431 } |
427 |
432 else |
428 if ( $cinfo = comment_exists($name, $comment_dt) ) { |
433 { |
429 // Update comments |
|
430 $comment['comment_ID'] = $cinfo; |
|
431 $ret_id = wp_update_comment($comment); |
|
432 } else { |
434 // Insert comments |
433 // Insert comments |
435 $ret_id = wp_insert_comment(array( |
434 $ret_id = wp_insert_comment($comment); |
436 'comment_post_ID' => $comment_post_ID, |
|
437 'comment_author' => $name, |
|
438 'comment_author_email' => $email, |
|
439 'comment_author_url' => $web, |
|
440 'comment_author_IP' => $comment_ip, |
|
441 'comment_date' => $comment_dt, |
|
442 'comment_date_gmt' => $comment_dt, |
|
443 'comment_content' => $message, |
|
444 'comment_approved' => $comment_approved) |
|
445 ); |
|
446 } |
435 } |
447 $dccm2wpcm[$comment_ID] = $ret_id; |
436 $dccm2wpcm[$comment_ID] = $ret_id; |
448 } |
437 } |
449 // Store Comment ID translation for future use |
438 // Store Comment ID translation for future use |
450 add_option('dccm2wpcm', $dccm2wpcm); |
439 add_option('dccm2wpcm', $dccm2wpcm); |
602 |
591 |
603 function tips() |
592 function tips() |
604 { |
593 { |
605 echo '<p>'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from DotClear, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'</p>'; |
594 echo '<p>'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from DotClear, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'</p>'; |
606 echo '<h3>'.__('Users').'</h3>'; |
595 echo '<h3>'.__('Users').'</h3>'; |
607 echo '<p>'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password. Forget it. You didn’t have that login in DotClear, why should you have it here? Instead we have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and DotClear uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. <strong>Every user has the same username, but their passwords are reset to password123.</strong> So <a href="%1$s">Login</a> and change it.'), '/wp-login.php').'</p>'; |
596 echo '<p>'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password. Forget it. You didn’t have that login in DotClear, why should you have it here? Instead we have taken care to import all of your users into our system. Unfortunately there is one downside. Because both WordPress and DotClear uses a strong encryption hash with passwords, it is impossible to decrypt it and we are forced to assign temporary passwords to all your users. <strong>Every user has the same username, but their passwords are reset to password123.</strong> So <a href="%1$s">Log in</a> and change it.'), '/wp-login.php').'</p>'; |
608 echo '<h3>'.__('Preserving Authors').'</h3>'; |
597 echo '<h3>'.__('Preserving Authors').'</h3>'; |
609 echo '<p>'.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'</p>'; |
598 echo '<p>'.__('Secondly, we have attempted to preserve post authors. If you are the only author or contributor to your blog, then you are safe. In most cases, we are successful in this preservation endeavor. However, if we cannot ascertain the name of the writer due to discrepancies between database tables, we assign it to you, the administrative user.').'</p>'; |
610 echo '<h3>'.__('Textile').'</h3>'; |
599 echo '<h3>'.__('Textile').'</h3>'; |
611 echo '<p>'.__('Also, since you’re coming from DotClear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing <a href="http://www.huddledmasses.org/category/development/wordpress/textile/">Textile for WordPress</a>. Trust me… You’ll want it.').'</p>'; |
600 echo '<p>'.__('Also, since you’re coming from DotClear, you probably have been using Textile to format your comments and posts. If this is the case, we recommend downloading and installing <a href="http://www.huddledmasses.org/category/development/wordpress/textile/">Textile for WordPress</a>. Trust me… You’ll want it.').'</p>'; |
612 echo '<h3>'.__('WordPress Resources').'</h3>'; |
601 echo '<h3>'.__('WordPress Resources').'</h3>'; |
614 echo '<ul>'; |
603 echo '<ul>'; |
615 echo '<li>'.__('<a href="http://www.wordpress.org">The official WordPress site</a>').'</li>'; |
604 echo '<li>'.__('<a href="http://www.wordpress.org">The official WordPress site</a>').'</li>'; |
616 echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>'; |
605 echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>'; |
617 echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>'; |
606 echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>'; |
618 echo '</ul>'; |
607 echo '</ul>'; |
619 echo '<p>'.sprintf(__('That’s it! What are you waiting for? Go <a href="%1$s">login</a>!'), '../wp-login.php').'</p>'; |
608 echo '<p>'.sprintf(__('That’s it! What are you waiting for? Go <a href="%1$s">log in</a>!'), '../wp-login.php').'</p>'; |
620 } |
609 } |
621 |
610 |
622 function db_form() |
611 function db_form() |
623 { |
612 { |
624 echo '<table class="form-table">'; |
613 echo '<table class="form-table">'; |