Permalink
Browse files

Trim empty lines. Nothing but newline.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 72c169c commit 2f09416258883cb043d4d958f00e825dab470fa6 ryan committed Jun 14, 2007
Showing with 432 additions and 432 deletions.
  1. +1 −1 wp-admin/edit-pages.php
  2. +2 −2 wp-admin/export.php
  3. +1 −1 wp-admin/import/blogger.php
  4. +1 −1 wp-admin/import/mt.php
  5. +73 −73 wp-admin/import/utw.php
  6. +3 −3 wp-admin/import/wordpress.php
  7. +55 −55 wp-admin/import/wp-cat2tag.php
  8. +1 −1 wp-admin/includes/bookmark.php
  9. +1 −1 wp-admin/includes/file.php
  10. +1 −1 wp-admin/includes/image.php
  11. +1 −1 wp-admin/includes/plugin.php
  12. +1 −1 wp-admin/includes/schema.php
  13. +2 −2 wp-admin/includes/template.php
  14. +1 −1 wp-admin/includes/theme.php
  15. +8 −8 wp-admin/includes/upgrade.php
  16. +1 −1 wp-admin/link-import.php
  17. +26 −26 wp-admin/moderation.php
  18. +1 −1 wp-admin/options-general.php
  19. +1 −1 wp-admin/options.php
  20. +2 −2 wp-admin/plugins.php
  21. +33 −33 wp-admin/widgets.php
  22. +2 −2 wp-app.php
  23. +10 −10 wp-content/themes/default/images/header-img.php
  24. +2 −2 wp-content/themes/default/sidebar.php
  25. +1 −1 wp-includes/author-template.php
  26. +8 −8 wp-includes/bookmark-template.php
  27. +2 −2 wp-includes/bookmark.php
  28. +12 −12 wp-includes/category-template.php
  29. +1 −1 wp-includes/class-IXR.php
  30. +37 −37 wp-includes/class-phpmailer.php
  31. +3 −3 wp-includes/class-smtp.php
  32. +1 −1 wp-includes/classes.php
  33. +2 −2 wp-includes/cron.php
  34. +1 −1 wp-includes/formatting.php
  35. +4 −4 wp-includes/functions.php
  36. +6 −6 wp-includes/general-template.php
  37. +1 −1 wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php
  38. +1 −1 wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php
  39. +2 −2 wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php
  40. +1 −1 wp-includes/js/tinymce/tiny_mce_config.php
  41. +1 −1 wp-includes/js/tinymce/tiny_mce_gzip.php
  42. +1 −1 wp-includes/kses.php
  43. +19 −19 wp-includes/link-template.php
  44. +2 −2 wp-includes/locale.php
  45. +25 −25 wp-includes/pluggable.php
  46. +3 −3 wp-includes/post-template.php
  47. +12 −12 wp-includes/post.php
  48. +2 −2 wp-includes/query.php
  49. +1 −1 wp-includes/rewrite.php
  50. +15 −15 wp-includes/script-loader.php
  51. +4 −4 wp-includes/streams.php
  52. +6 −6 wp-includes/taxonomy.php
  53. +6 −6 wp-includes/theme.php
  54. +2 −2 wp-includes/user.php
  55. +4 −4 wp-includes/vars.php
  56. +9 −9 wp-includes/widgets.php
  57. +2 −2 wp-includes/wp-db.php
  58. +1 −1 wp-mail.php
  59. +1 −1 wp-settings.php
  60. +3 −3 xmlrpc.php
@@ -41,7 +41,7 @@
<input type="text" name="s" id="s" value="<?php echo attribute_escape( stripslashes( $_GET['s'] ) ); ?>" size="17" />
</fieldset>
-
+
<fieldset><legend><?php _e('Page Type&hellip;'); ?></legend>
<select name='post_status'>
<option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option>
View
@@ -133,9 +133,9 @@ function wxr_category_description($c) {
categories. You may use this file to transfer that content from one site to
another. This file is not intended to serve as a complete backup of your
blog.
-
+
To import this information into a WordPress blog follow these steps:
-
+
1. Log into that blog as an administrator.
2. Go to Manage > Import in the blog's admin.
3. Choose "WordPress" from the list of importers.
@@ -915,7 +915,7 @@ function start_element($parser, $name, $attrs) {
if(count($this->in_content) == 2) {
array_push($this->in_content, ">");
}
-
+
array_push($this->in_content, "<". $this->ns_to_prefix($name) ."{$xmlns_str}{$attrs_str}");
} else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
$this->in_content = array();
@@ -272,7 +272,7 @@ function process_posts() {
$comments = array();
$ping = new StdClass();
$pings = array();
-
+
echo "<div class='wrap'><ol>";
while ( $line = fgets($handle) ) {
@@ -1,7 +1,7 @@
<?php
class UTW_Import {
-
+
function header() {
echo '<div class="wrap">';
echo '<h2>'.__('Import Ultimate Tag Warrior').'</h2>';
@@ -23,18 +23,18 @@ function greet() {
echo '</form>';
echo '</div>';
}
-
-
+
+
function dispatch () {
if ( empty( $_GET['step'] ) ) {
$step = 0;
} else {
$step = (int) $_GET['step'];
}
-
+
// load the header
$this->header();
-
+
switch ( $step ) {
case 0 :
$this->greet();
@@ -52,18 +52,18 @@ function dispatch () {
$this->cleanup_import();
break;
}
-
+
// load the footer
$this->footer();
}
-
-
+
+
function import_tags ( ) {
echo '<div class="narrow">';
echo '<p><h3>'.__('Reading UTW Tags&#8230;').'</h3></p>';
-
+
$tags = $this->get_utw_tags();
-
+
// if we didn't get any tags back, that's all there is folks!
if ( !is_array($tags) ) {
echo '<p>' . __('No Tags Found!') . '</p>';
@@ -77,37 +77,37 @@ function import_tags ( ) {
}
add_option('utwimp_tags', $tags);
-
+
$count = count($tags);
-
+
echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags were read.'), $count ) . '<br /></p>';
echo '<p>' . __('The following tags were found:') . '</p>';
-
+
echo '<ul>';
-
+
foreach ( $tags as $tag_id => $tag_name ) {
-
+
echo '<li>' . $tag_name . '</li>';
-
+
}
-
+
echo '</ul>';
-
+
echo '<br />';
-
+
echo '<p>' . __('If you don&#8217;t want to import any of these tags, you should delete them from the UTW tag management page and then re-run this import.') . '</p>';
-
-
+
+
}
-
+
echo '<form action="admin.php?import=utw&amp;step=2" method="post">';
echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 2 &raquo;').'" /></p>';
echo '</form>';
echo '</div>';
}
-
-
+
+
function import_posts ( ) {
echo '<div class="narrow">';
echo '<p><h3>'.__('Reading UTW Post Tags&#8230;').'</h3></p>';
@@ -128,12 +128,12 @@ function import_posts ( ) {
}
add_option('utwimp_posts', $posts);
-
+
$count = count($posts);
-
+
echo '<p>' . sprintf( __('Done! <strong>%s</strong> tag to post relationships were read.'), $count ) . '<br /></p>';
-
+
}
echo '<form action="admin.php?import=utw&amp;step=3" method="post">';
@@ -142,16 +142,16 @@ function import_posts ( ) {
echo '</div>';
}
-
-
+
+
function import_t2p ( ) {
echo '<div class="narrow">';
echo '<p><h3>'.__('Adding Tags to Posts&#8230;').'</h3></p>';
// run that funky magic!
$tags_added = $this->tag2post();
-
+
echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags where added!'), $tags_added ) . '<br /></p>';
echo '<form action="admin.php?import=utw&amp;step=4" method="post">';
@@ -160,104 +160,104 @@ function import_t2p ( ) {
echo '</div>';
}
-
-
+
+
function get_utw_tags ( ) {
-
+
global $wpdb;
-
+
// read in all the tags from the UTW tags table: should be wp_tags
$tags_query = "SELECT tag_id, tag FROM " . $wpdb->prefix . "tags";
-
+
$tags = $wpdb->get_results($tags_query);
-
+
// rearrange these tags into something we can actually use
foreach ( $tags as $tag ) {
-
+
$new_tags[$tag->tag_id] = $tag->tag;
-
+
}
-
+
return $new_tags;
}
-
+
function get_utw_posts ( ) {
-
+
global $wpdb;
-
+
// read in all the posts from the UTW post->tag table: should be wp_post2tag
$posts_query = "SELECT tag_id, post_id FROM " . $wpdb->prefix . "post2tag";
-
+
$posts = $wpdb->get_results($posts_query);
-
+
return $posts;
-
+
}
-
-
+
+
function tag2post ( ) {
-
+
// get the tags and posts we imported in the last 2 steps
$tags = get_option('utwimp_tags');
$posts = get_option('utwimp_posts');
-
+
// null out our results
$tags_added = 0;
-
+
// loop through each post and add its tags to the db
foreach ( $posts as $this_post ) {
-
+
$the_post = (int) $this_post->post_id;
$the_tag = (int) $this_post->tag_id;
-
+
// what's the tag name for that id?
$the_tag = $tags[$the_tag];
-
+
// screw it, just try to add the tag
wp_add_post_tags($the_post, $the_tag);
$tags_added++;
-
+
}
-
+
// that's it, all posts should be linked to their tags properly, pending any errors we just spit out!
return $tags_added;
-
-
+
+
}
-
-
+
+
function cleanup_import ( ) {
-
+
delete_option('utwimp_tags');
delete_option('utwimp_posts');
-
+
$this->done();
-
+
}
-
-
+
+
function done ( ) {
-
+
echo '<div class="narrow">';
echo '<p><h3>'.__('Import Complete!').'</h3></p>';
-
+
echo '<p>' . __('OK, so we lied about this being a 5-step program! You&#8217;re done!') . '</p>';
-
+
echo '<p>' . __('Now wasn&#8217;t that easy?') . '</p>';
-
+
echo '</div>';
-
+
}
-
+
function UTW_Import ( ) {
-
+
// Nothing.
-
+
}
-
+
}
@@ -251,14 +251,14 @@ function process_posts() {
echo '<h3>'.sprintf(__('All done.').' <a href="%s">'.__('Have fun!').'</a>', get_option('home')).'</h3>';
}
-
+
function process_post($post) {
global $wpdb;
$post_ID = (int) $this->get_tag( $post, 'wp:post_id' );
if ( $post_ID && !empty($this->posts_processed[$post_ID][1]) ) // Processed already
return 0;
-
+
// There are only ever one of these
$post_title = $this->get_tag( $post, 'title' );
$post_date = $this->get_tag( $post, 'wp:post_date' );
@@ -311,7 +311,7 @@ function process_post($post) {
// Memorize old and new ID.
if ( $post_id && $post_ID && $this->posts_processed[$post_ID] )
$this->posts_processed[$post_ID][1] = $post_id; // New ID.
-
+
// Add categories.
if (count($categories) > 0) {
$post_cats = array();
Oops, something went wrong.

0 comments on commit 2f09416

Please sign in to comment.