TP importer tweaks.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-11-29 14:59:23 +00:00
parent 489c6c4257
commit dacae390a1

View File

@ -21,9 +21,6 @@ $txpcfg['table_prefix'] = '';
// STOP EDITING
add_option('tpre',$txpcfg['table_prefix']);
/**
Add These Functions to make our lives easier
**/
@ -604,6 +601,8 @@ class Textpattern_Import {
function dispatch()
{
global $txpdb, $txpcfg;
if (empty ($_GET['step']))
$step = 0;
else
@ -611,6 +610,11 @@ class Textpattern_Import {
$this->header();
if ( $step > 0 ) {
add_option('tpre',$txpcfg['table_prefix']);
$txpdb = new wpdb($txpcfg['user'], $txpcfg['pass'], $txpcfg['db'], $txpcfg['host']);
}
switch ($step)
{
default:
@ -646,8 +650,6 @@ class Textpattern_Import {
}
}
$txpdb = new wpdb($txpcfg['user'], $txpcfg['pass'], $txpcfg['db'], $txpcfg['host']);
$txp_import = new Textpattern_Import();
register_importer('textpattern', 'Textpattern', __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));
?>