]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/import/dotclear.php
Wordpress 2.9
[autoinstalls/wordpress.git] / wp-admin / import / dotclear.php
index d6552f76e9c05141c4404df18bd311bfcdbb6051..fcde9b1773838f947d5d13a7c4e32fc83fac1292 100644 (file)
@@ -413,11 +413,7 @@ class Dotclear_Import {
                                $web = "http://".$wpdb->escape($comment_site);
                                $message = $wpdb->escape(textconv ($comment_content));
 
-                               if($cinfo = comment_exists($name, $comment_dt))
-                               {
-                                       // Update comments
-                                       $ret_id = wp_update_comment(array(
-                                                       'comment_ID'            => $cinfo,
+                               $comment = array(
                                                        'comment_post_ID'       => $comment_post_ID,
                                                        'comment_author'        => $name,
                                                        'comment_author_email'  => $email,
@@ -426,23 +422,16 @@ class Dotclear_Import {
                                                        'comment_date'          => $comment_dt,
                                                        'comment_date_gmt'      => $comment_dt,
                                                        'comment_content'       => $message,
-                                                       'comment_approved'      => $comment_approved)
-                                                       );
-                               }
-                               else
-                               {
+                                                       'comment_approved'      => $comment_approved);
+                               $comment = wp_filter_comment($comment);
+
+                               if ( $cinfo = comment_exists($name, $comment_dt) ) {
+                                       // Update comments
+                                       $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'     => $comment_ip,
-                                                       'comment_date'          => $comment_dt,
-                                                       'comment_date_gmt'      => $comment_dt,
-                                                       'comment_content'       => $message,
-                                                       'comment_approved'      => $comment_approved)
-                                                       );
+                                       $ret_id = wp_insert_comment($comment);
                                }
                                $dccm2wpcm[$comment_ID] = $ret_id;
                        }
@@ -604,7 +593,7 @@ class Dotclear_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 DotClear, 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 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>';
+               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 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>';
                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>';
@@ -616,7 +605,7 @@ class Dotclear_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>!'), '../wp-login.php').'</p>';
+               echo '<p>'.sprintf(__('That&#8217;s it! What are you waiting for? Go <a href="%1$s">log in</a>!'), '../wp-login.php').'</p>';
        }
 
        function db_form()