<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12608] trunk/wp-admin/link-import.php: Remove link-import.php.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12608">12608</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-06 20:10:37 +0000 (Wed, 06 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Remove link-import.php. fixes <a href="http://trac.wordpress.org/ticket/11755">#11755</a></pre>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkwpadminlinkimportphp">trunk/wp-admin/link-import.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminlinkimportphp"></a>
<div class="delfile"><h4>Deleted: trunk/wp-admin/link-import.php (12607 => 12608)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/link-import.php        2010-01-06 20:09:39 UTC (rev 12607)
+++ trunk/wp-admin/link-import.php        2010-01-06 20:10:37 UTC (rev 12608)
</span><span class="lines">@@ -1,144 +0,0 @@
</span><del>-<?php
-/**
- * Links Import Administration Panel.
- *
- * @copyright 2002 Mike Little <mike@zed1.com>
- * @author Mike Little <mike@zed1.com>
- * @package WordPress
- * @subpackage Administration
- */
-
-/** Load WordPress Administration Bootstrap */
-require_once('admin.php');
-$parent_file = 'edit.php';
-$title = __('Import Blogroll');
-
-$step = $_POST['step'];
-if (!$step) $step = 0;
-?>
-<?php
-switch ($step) {
-        case 0: {
-                include_once('admin-header.php');
-                if ( !current_user_can('manage_links') )
-                        wp_die(__('Cheatin&#8217; uh?'));
-
-                $opmltype = 'blogrolling'; // default.
-?>
-
-<div class="wrap">
-
-<h2><?php _e('Import your blogroll from another system') ?> </h2>
-<form enctype="multipart/form-data" action="link-import.php" method="post" name="blogroll">
-<?php wp_nonce_field('import-bookmarks') ?>
-
-<p><?php _e('If a program or website you use allows you to export your links or subscriptions as OPML you may import them here.'); ?></p>
-<div style="width: 70%; margin: auto; height: 8em;">
-<input type="hidden" name="step" value="1" />
-<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
-<div style="width: 48%;" class="alignleft">
-<h3><label for="opml_url"><?php _e('Specify an OPML URL:'); ?></label></h3>
-<input type="text" name="opml_url" id="opml_url" size="50" style="width: 90%;" value="http://" />
-</div>
-
-<div style="width: 48%;" class="alignleft">
-<h3><label for="userfile"><?php _e('Or choose from your local disk:'); ?></label></h3>
-<input id="userfile" name="userfile" type="file" size="30" />
-</div>
-
-</div>
-
-<p style="clear: both; margin-top: 1em;"><label for="cat_id"><?php _e('Now select a category you want to put these links in.') ?></label><br />
-<?php _e('Category:') ?> <select name="cat_id" id="cat_id">
-<?php
-$categories = get_terms('link_category', 'get=all');
-foreach ($categories as $category) {
-?>
-<option value="<?php echo $category->term_id; ?>"><?php echo wp_specialchars(apply_filters('link_category', $category->name)); ?></option>
-<?php
-} // end foreach
-?>
-</select></p>
-
-<p class="submit"><input type="submit" name="submit" value="<?php _e('Import OPML File') ?>" /></p>
-</form>
-
-</div>
-<?php
-                break;
-        } // end case 0
-
-        case 1: {
-                check_admin_referer('import-bookmarks');
-
-                include_once('admin-header.php');
-                if ( !current_user_can('manage_links') )
-                        wp_die(__('Cheatin&#8217; uh?'));
-?>
-<div class="wrap">
-
-<h2><?php _e('Importing...') ?></h2>
-<?php
-                $cat_id = abs( (int) $_POST['cat_id'] );
-                if ( $cat_id < 1 )
-                        $cat_id = 1;
-
-                $opml_url = $_POST['opml_url'];
-                if ( isset($opml_url) && $opml_url != '' && $opml_url != 'http://' ) {
-                        $blogrolling = true;
-                } else { // try to get the upload file.
-                        $overrides = array('test_form' => false, 'test_type' => false);
-                        $file = wp_handle_upload($_FILES['userfile'], $overrides);
-
-                        if ( isset($file['error']) )
-                                wp_die($file['error']);
-
-                        $url = $file['url'];
-                        $opml_url = $file['file'];
-                        $blogrolling = false;
-                }
-
-                if ( isset($opml_url) && $opml_url != '' ) {
-                        if ( $blogrolling === true ) {
-                                $opml = wp_remote_fopen($opml_url);
-                        } else {
-                                $opml = file_get_contents($opml_url);
-                        }
-
-                        /** Load OPML Parser */
-                        include_once('link-parse-opml.php');
-
-                        $link_count = count($names);
-                        for ( $i = 0; $i < $link_count; $i++ ) {
-                                if ('Last' == substr($titles[$i], 0, 4))
-                                        $titles[$i] = '';
-                                if ( 'http' == substr($titles[$i], 0, 4) )
-                                        $titles[$i] = '';
-                                $link = array( 'link_url' => $urls[$i], 'link_name' => $wpdb->escape($names[$i]), 'link_category' => array($cat_id), 'link_description' => $wpdb->escape($descriptions[$i]), 'link_owner' => $user_ID, 'link_rss' => $feeds[$i]);
-                                wp_insert_link($link);
-                                echo sprintf('<p>'.__('Inserted <strong>%s</strong>').'</p>', $names[$i]);
-                        }
-?>
-
-<p><?php printf(__('Inserted %1$d links into category %2$s. All done! Go <a href="%3$s">manage those links</a>.'), $link_count, $cat_id, 'link-manager.php') ?></p>
-
-<?php
-} // end if got url
-else
-{
-        echo "<p>" . __("You need to supply your OPML url. Press back on your browser and try again") . "</p>\n";
-} // end else
-
-if ( ! $blogrolling )
-        do_action( 'wp_delete_file', $opml_url);
-        @unlink($opml_url);
-?>
-</div>
-<?php
-                break;
-        } // end case 1
-} // end switch
-
-include('admin-footer.php');
-
-?>
</del></span></pre>
</div>
</div>
</body>
</html>