Update of /cvsroot/php-blog/serendipity/include/admin/importers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15361/include/admin/importers
Modified Files:
wordpress.inc.php
Log Message:
honor WPs comment_status.
Index: wordpress.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/importers/wordpress.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- wordpress.inc.php 14 Feb 2005 12:51:33 -0000 1.9
+++ wordpress.inc.php 17 Feb 2005 11:31:04 -0000 1.10
@@ -228,13 +228,15 @@
'email' => $a['comment_author_email'],
'url' => $a['comment_author_url'],
'ip' => $a['comment_author_IP'],
- 'status' => 'approved',
+ 'status' => (empty($a['comment_approved']) || $a['comment_approved'] == '1') ? 'approved' : 'pending',
'body' => $a['comment_content'],
'type' => 'NORMAL');
serendipity_db_insert('comments', $this->strtrRecursive($comment, $trans_table));
- $cid = serendipity_db_insert_id('comments', 'id');
- serendipity_approveComment($cid, $entry['entryid'], true);
+ if ($comment['status'] == 'approved') {
+ $cid = serendipity_db_insert_id('comments', 'id');
+ serendipity_approveComment($cid, $entry['entryid'], true);
+ }
}
}
}
@@ -249,4 +251,4 @@
return 'Serendipity_Import_WordPress';
/* vim: set sts=4 ts=4 expandtab : */
-?>
+?>
\ No newline at end of file
|