Make WordPress Core

Ticket #8403: blogger.diff

File blogger.diff, 3.9 KB (added by sivel, 16 years ago)
  • wp-admin/import/blogger.php

     
    4545
    4646        // Shows the welcome screen and the magic auth link.
    4747        function greet() {
    48                 $next_url = get_option('siteurl') . '/wp-admin/index.php?import=blogger&noheader=true';
     48                $next_url = get_option('siteurl') . '/wp-admin/index.php?import=blogger&noheader=true';
    4949                $auth_url = "https://www.google.com/accounts/AuthSubRequest";
    5050                $title = __('Import Blogger');
    5151                $welcome = __('Howdy! This importer allows you to import posts and comments from your Blogger account into your WordPress blog.');
     
    223223                        $rows .= "<tr id='blog$i'><td class='blogtitle'>$blogtitle</td><td class='bloghost'>{$blog['host']}</td><td class='bar'>$pstat</td><td class='bar'>$cstat</td><td class='submit'><input type='submit' class='button' id='submit$i' value='$value' /><input type='hidden' name='blog' value='$i' /></td></tr>\n";
    224224                }
    225225
    226                 echo "<div class='wrap'><h2>$title</h2><noscript>$noscript</noscript><table cellpadding='5px'><thead><td>$name</td><td>$url</td><td>$posts</td><td>$comments</td><td>$action</td></thead>\n$rows</table></form></div>";
     226                echo "<div class='wrap'><h2>$title</h2><noscript>$noscript</noscript><table cellpadding='5px'><thead><tr><td>$name</td><td>$url</td><td>$posts</td><td>$comments</td><td>$action</td></tr></thead>\n$rows</table></div>";
    227227                echo "
    228228                <script type='text/javascript'>
     229                /* <![CDATA[ */
    229230                        var strings = {cont:'$continue',stop:'$stop',stopping:'$stopping',authors:'$authors',nothing:'$nothing'};
    230231                        var blogs = {};
    231232                        function blog(i, title, mode, status){
     
    338339                        };
    339340                        $init
    340341                        jQuery.each(blogs, function(i, me){me.init();});
     342                /* ]]> */
    341343                </script>\n";
    342344        }
    343345
     
    660662                foreach ( $blog['authors'] as $i => $author )
    661663                        $rows .= "<tr><td><label for='authors[$i]'>{$author[0]}</label></td><td><select name='authors[$i]' id='authors[$i]'>" . $this->get_user_options($author[1]) . "</select></td></tr>";
    662664
    663                 return "<div class='wrap'><h2>$heading</h2><h3>$blogtitle</h3><p>$directions</p><form action='index.php?import=blogger&noheader=true&saveauthors=1' method='post'><input type='hidden' name='blog' value='$importing_blog' /><table cellpadding='5'><thead><td>$mapthis</td><td>$tothis</td></thead>$rows<tr><td></td><td class='submit'><input type='submit' class='button authorsubmit' value='$submit' /></td></tr></table></form></div>";
     665                return "<div class='wrap'><h2>$heading</h2><h3>$blogtitle</h3><p>$directions</p><form action='index.php?import=blogger&amp;noheader=true&saveauthors=1' method='post'><input type='hidden' name='blog' value='$importing_blog' /><table cellpadding='5'><thead><td>$mapthis</td><td>$tothis</td></thead>$rows<tr><td></td><td class='submit'><input type='submit' class='button authorsubmit' value='$submit' /></td></tr></table></form></div>";
    664666        }
    665667
    666668        function get_user_options($current) {
     
    830832                        $restart = __('Restart');
    831833                        $message = __('We have saved some information about your Blogger account in your WordPress database. Clearing this information will allow you to start over. Restarting will not affect any posts you have already imported. If you attempt to re-import a blog, duplicate posts and comments will be skipped.');
    832834                        $submit = __('Clear account information');
    833                         echo "<div class='wrap'><h2>$restart</h2><p>$message</p><form method='post' action='?import=blogger&noheader=true'><p class='submit' style='text-align:left;'><input type='submit' class='button' value='$submit' name='restart' /></p></form></div>";
     835                        echo "<div class='wrap'><h2>$restart</h2><p>$message</p><form method='post' action='?import=blogger&amp;noheader=true'><p class='submit' style='text-align:left;'><input type='submit' class='button' value='$submit' name='restart' /></p></form></div>";
    834836                }
    835837        }
    836838