<!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>[14968] trunk/wp-admin/import.php:
  Match up plugin slugs with importer slugs when checking if they'
 re installed.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14968">14968</a></dd>
<dt>Author</dt> <dd>nacin</dd>
<dt>Date</dt> <dd>2010-05-27 00:32:01 +0000 (Thu, 27 May 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Match up plugin slugs with importer slugs when checking if they're installed. They're different for MT and wpcat2tag currently. see <a href="http://trac.wordpress.org/ticket/13566">#13566</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminimportphp">trunk/wp-admin/import.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminimportphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/import.php (14967 => 14968)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/import.php        2010-05-27 00:16:34 UTC (rev 14967)
+++ trunk/wp-admin/import.php        2010-05-27 00:32:01 UTC (rev 14968)
</span><span class="lines">@@ -54,9 +54,9 @@
</span><span class="cx"> if ( current_user_can('install_plugins') )
</span><span class="cx">         $popular_importers = array(
</span><span class="cx">                 'blogger' =&gt; array( __('Blogger'), __('Install the Blogger importer to import posts, comments, and users from a Blogger blog.'), 'install' ),
</span><del>-                'wpcat2tag' =&gt; array(__('Categories and Tags Converter'), __('Install the category/tag converter to convert existing categories to tags or tags to categories, selectively.'), 'install'),
</del><ins>+                'wpcat2tag' =&gt; array(__('Categories and Tags Converter'), __('Install the category/tag converter to convert existing categories to tags or tags to categories, selectively.'), 'install', 'wp-cat2tag' ),
</ins><span class="cx">                 'livejournal' =&gt; array( __( 'LiveJournal' ), __( 'Install the LiveJournal importer to import posts from LiveJournal using their API.' ), 'install' ),
</span><del>-                'movabletype' =&gt; array( __('Movable Type and TypePad'), __('Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.'), 'install' ),
</del><ins>+                'movabletype' =&gt; array( __('Movable Type and TypePad'), __('Install the Movable Type importer to import posts and comments from a Movable Type or TypePad blog.'), 'install', 'mt' ),
</ins><span class="cx">                 'opml' =&gt; array( __('Blogroll'), __('Install the blogroll importer to import links in OPML format.'), 'install' ),
</span><span class="cx">                 'rss' =&gt; array( __('RSS'), __('Install the RSS importer to import posts from an RSS feed.'), 'install' ),
</span><span class="cx">                 'wordpress' =&gt; array( 'WordPress', __('Install the WordPress importer to import posts, pages, comments, custom fields, categories, and tags from a WordPress export file.'), 'install' )
</span><span class="lines">@@ -65,9 +65,12 @@
</span><span class="cx"> $importers = get_importers();
</span><span class="cx"> 
</span><span class="cx"> // If a popular importer is not registered, create a dummy registration that links to the plugin installer.
</span><del>-foreach ( array_keys($popular_importers) as $pop_importer ) {
</del><ins>+foreach ( $popular_importers as $pop_importer =&gt; $pop_data ) {
</ins><span class="cx">         if ( isset($importers[$pop_importer] ) )
</span><span class="cx">                 continue;
</span><ins>+        var_dump( $pop_data );
+        if ( isset( $pop_data[3] ) &amp;&amp; isset( $importers[ $pop_data[3] ] ) )
+                continue;
</ins><span class="cx"> 
</span><span class="cx">         $importers[$pop_importer] = $popular_importers[$pop_importer];
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>