X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be8dc178e77d0b46189bbd8e33a216a9b90942..refs/tags/wordpress-2.9:/wp-admin/import/blogware.php diff --git a/wp-admin/import/blogware.php b/wp-admin/import/blogware.php index afec323c..531ceddc 100644 --- a/wp-admin/import/blogware.php +++ b/wp-admin/import/blogware.php @@ -42,6 +42,10 @@ class BW_Import { echo ''; } + function _normalize_tag( $matches ) { + return '<' . strtolower( $matches[1] ); + } + function import_posts() { global $wpdb, $current_user; @@ -89,7 +93,7 @@ class BW_Import { } // Clean up content - $post_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $post_content); + $post_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $post_content); $post_content = str_replace('
', '
', $post_content); $post_content = str_replace('
', '
', $post_content); $post_content = $wpdb->escape($post_content); @@ -109,7 +113,7 @@ class BW_Import { return $post_id; } if (!$post_id) { - _e("Couldn't get post ID"); + _e('Couldn’t get post ID'); echo ''; break; } @@ -129,7 +133,7 @@ class BW_Import { $comment_content = $this->unhtmlentities($comment_content); // Clean up content - $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', create_function('$match', 'return "<" . strtolower($match[1]);'), $comment_content); + $comment_content = preg_replace_callback('|<(/?[A-Z]+)|', array( &$this, '_normalize_tag' ), $comment_content); $comment_content = str_replace('
', '
', $comment_content); $comment_content = str_replace('
', '
', $comment_content); $comment_content = $wpdb->escape($comment_content); @@ -155,7 +159,7 @@ class BW_Import { } if ( $num_comments ) { echo ' '; - printf( __ngettext('%s comment', '%s comments', $num_comments), $num_comments ); + printf( _n('%s comment', '%s comments', $num_comments), $num_comments ); } echo ''; flush();