]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/import/textpattern.php
Wordpress 2.9
[autoinstalls/wordpress.git] / wp-admin / import / textpattern.php
index 2cbf36e0e0dcf3784523cb5a30229141dac5b8d3..fb4721393565e7b522c51fd7f6ade59c8f589e74 100644 (file)
@@ -397,33 +397,24 @@ class Textpattern_Import {
                                $web = $wpdb->escape($web);
                                $message = $wpdb->escape($message);
 
-                               if($cinfo = comment_exists($name, $posted))
-                               {
+                               $comment = array(
+                                                       'comment_post_ID'       => $comment_post_ID,
+                                                       'comment_author'        => $name,
+                                                       'comment_author_IP'     => $ip,
+                                                       'comment_author_email'  => $email,
+                                                       'comment_author_url'    => $web,
+                                                       'comment_date'          => $posted,
+                                                       'comment_content'       => $message,
+                                                       'comment_approved'      => $comment_approved);
+                               $comment = wp_filter_comment($comment);
+
+                               if ( $cinfo = comment_exists($name, $posted) ) {
                                        // Update comments
-                                       $ret_id = wp_update_comment(array(
-                                               'comment_ID'                    => $cinfo,
-                                               'comment_post_ID'               => $comment_post_ID,
-                                               'comment_author'                => $name,
-                                               'comment_author_email'  => $email,
-                                               'comment_author_url'    => $web,
-                                               'comment_date'                  => $posted,
-                                               'comment_content'               => $message,
-                                               'comment_approved'              => $comment_approved)
-                                               );
-                               }
-                               else
-                               {
+                                       $comment['comment_ID'] = $cinfo;
+                                       $ret_id = wp_update_comment($comment);
+                               } else {
                                        // Insert comments
-                                       $ret_id = wp_insert_comment(array(
-                                               'comment_post_ID'               => $comment_post_ID,
-                                               'comment_author'                => $name,
-                                               'comment_author_email'  => $email,
-                                               'comment_author_url'    => $web,
-                                               'comment_author_IP'             => $ip,
-                                               'comment_date'                  => $posted,
-                                               'comment_content'               => $message,
-                                               'comment_approved'              => $comment_approved)
-                                               );
+                                       $ret_id = wp_insert_comment($comment);
                                }
                                $txpcm2wpcm[$comment_ID] = $ret_id;
                        }
@@ -582,7 +573,7 @@ class Textpattern_Import {
        {
                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>';
                echo '<h3>'.__('Users').'</h3>';
-               echo '<p>'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password.  Forget it.  You didn&#8217;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>';
+               echo '<p>'.sprintf(__('You have already setup WordPress and have been assigned an administrative login and password.  Forget it.  You didn&#8217;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>';
                echo '<h3>'.__('Preserving Authors').'</h3>';
                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>';
                echo '<h3>'.__('Textile').'</h3>';
@@ -594,7 +585,7 @@ class Textpattern_Import {
                echo '<li>'.__('<a href="http://wordpress.org/support/">The WordPress support forums</a>').'</li>';
                echo '<li>'.__('<a href="http://codex.wordpress.org">The Codex (In other words, the WordPress Bible)</a>').'</li>';
                echo '</ul>';
-               echo '<p>'.sprintf(__('That&#8217;s it! What are you waiting for? Go <a href="%1$s">login</a>!'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>';
+               echo '<p>'.sprintf(__('That&#8217;s it! What are you waiting for? Go <a href="%1$s">log in</a>!'), get_bloginfo( 'wpurl' ) . '/wp-login.php').'</p>';
        }
 
        function db_form()