]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/import/blogware.php
Wordpress 2.7.1
[autoinstalls/wordpress.git] / wp-admin / import / blogware.php
index 6bb63a7bdf3bfc0220b8da5b448c2a9a1e2dc9a4..afec323c3bc80619ef69a6deb90ecf29a74f2c0f 100644 (file)
@@ -1,13 +1,27 @@
 <?php
-
-/* By Shayne Sweeney - http://www.theshayne.com/ */
-
+/**
+ * Blogware XML Importer
+ *
+ * @package WordPress
+ * @subpackage Importer
+ * @author Shayne Sweeney
+ * @link http://www.theshayne.com/
+ */
+
+/**
+ * Blogware XML Importer class
+ *
+ * Extract posts from Blogware XML export file into your blog.
+ *
+ * @since unknown
+ */
 class BW_Import {
 
        var $file;
 
        function header() {
                echo '<div class="wrap">';
+               screen_icon();
                echo '<h2>'.__('Import Blogware').'</h2>';
        }
 
@@ -75,7 +89,7 @@ class BW_Import {
                        }
 
                        // Clean up content
-                       $post_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $post_content);
+                       $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content);
                        $post_content = str_replace('<br>', '<br />', $post_content);
                        $post_content = str_replace('<hr>', '<hr />', $post_content);
                        $post_content = $wpdb->escape($post_content);
@@ -115,7 +129,7 @@ class BW_Import {
                                        $comment_content = $this->unhtmlentities($comment_content);
 
                                        // Clean up content
-                                       $comment_content = preg_replace('|<(/?[A-Z]+)|e', "'<' . strtolower('$1')", $comment_content);
+                                       $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content);
                                        $comment_content = str_replace('<br>', '<br />', $comment_content);
                                        $comment_content = str_replace('<hr>', '<hr />', $comment_content);
                                        $comment_content = $wpdb->escape($comment_content);