395 $name = $wpdb->escape($name); |
395 $name = $wpdb->escape($name); |
396 $email = $wpdb->escape($email); |
396 $email = $wpdb->escape($email); |
397 $web = $wpdb->escape($web); |
397 $web = $wpdb->escape($web); |
398 $message = $wpdb->escape($message); |
398 $message = $wpdb->escape($message); |
399 |
399 |
400 if($cinfo = comment_exists($name, $posted)) |
400 $comment = array( |
401 { |
401 'comment_post_ID' => $comment_post_ID, |
|
402 'comment_author' => $name, |
|
403 'comment_author_IP' => $ip, |
|
404 'comment_author_email' => $email, |
|
405 'comment_author_url' => $web, |
|
406 'comment_date' => $posted, |
|
407 'comment_content' => $message, |
|
408 'comment_approved' => $comment_approved); |
|
409 $comment = wp_filter_comment($comment); |
|
410 |
|
411 if ( $cinfo = comment_exists($name, $posted) ) { |
402 // Update comments |
412 // Update comments |
403 $ret_id = wp_update_comment(array( |
413 $comment['comment_ID'] = $cinfo; |
404 'comment_ID' => $cinfo, |
414 $ret_id = wp_update_comment($comment); |
405 'comment_post_ID' => $comment_post_ID, |
415 } else { |
406 'comment_author' => $name, |
|
407 'comment_author_email' => $email, |
|
408 'comment_author_url' => $web, |
|
409 'comment_date' => $posted, |
|
410 'comment_content' => $message, |
|
411 'comment_approved' => $comment_approved) |
|
412 ); |
|
413 } |
|
414 else |
|
415 { |
|
416 // Insert comments |
416 // Insert comments |
417 $ret_id = wp_insert_comment(array( |
417 $ret_id = wp_insert_comment($comment); |
418 'comment_post_ID' => $comment_post_ID, |
|
419 'comment_author' => $name, |
|
420 'comment_author_email' => $email, |
|
421 'comment_author_url' => $web, |
|
422 'comment_author_IP' => $ip, |
|
423 'comment_date' => $posted, |
|
424 'comment_content' => $message, |
|
425 'comment_approved' => $comment_approved) |
|
426 ); |
|
427 } |
418 } |
428 $txpcm2wpcm[$comment_ID] = $ret_id; |
419 $txpcm2wpcm[$comment_ID] = $ret_id; |
429 } |
420 } |
430 // Store Comment ID translation for future use |
421 // Store Comment ID translation for future use |
431 add_option('txpcm2wpcm', $txpcm2wpcm); |
422 add_option('txpcm2wpcm', $txpcm2wpcm); |
580 |
571 |
581 function tips() |
572 function tips() |
582 { |
573 { |
583 echo '<p>'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from Textpattern, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'</p>'; |
574 echo '<p>'.__('Welcome to WordPress. We hope (and expect!) that you will find this platform incredibly rewarding! As a new WordPress user coming from Textpattern, there are some things that we would like to point out. Hopefully, they will help your transition go as smoothly as possible.').'</p>'; |
584 echo '<h3>'.__('Users').'</h3>'; |
575 echo '<h3>'.__('Users').'</h3>'; |
585 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 Textpattern, 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 Textpattern 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.'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>'; |
576 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 Textpattern, 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 Textpattern 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.'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>'; |
586 echo '<h3>'.__('Preserving Authors').'</h3>'; |
577 echo '<h3>'.__('Preserving Authors').'</h3>'; |
587 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>'; |
578 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>'; |
588 echo '<h3>'.__('Textile').'</h3>'; |
579 echo '<h3>'.__('Textile').'</h3>'; |
589 echo '<p>'.__('Also, since you’re coming from Textpattern, 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>'; |
580 echo '<p>'.__('Also, since you’re coming from Textpattern, 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>'; |
590 echo '<h3>'.__('WordPress Resources').'</h3>'; |
581 echo '<h3>'.__('WordPress Resources').'</h3>'; |
592 echo '<ul>'; |
583 echo '<ul>'; |
593 echo '<li>'.__('<a href="http://www.wordpress.org">The official WordPress site</a>').'</li>'; |
584 echo '<li>'.__('<a href="http://www.wordpress.org">The official WordPress site</a>').'</li>'; |
594 echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>'; |
585 echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>'; |
595 echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>'; |
586 echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>'; |
596 echo '</ul>'; |
587 echo '</ul>'; |
597 echo '<p>'.sprintf(__('That’s it! What are you waiting for? Go <a href="%1$s">login</a>!'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>'; |
588 echo '<p>'.sprintf(__('That’s it! What are you waiting for? Go <a href="%1$s">log in</a>!'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>'; |
598 } |
589 } |
599 |
590 |
600 function db_form() |
591 function db_form() |
601 { |
592 { |
602 echo '<table class="form-table">'; |
593 echo '<table class="form-table">'; |