From 5bbfb576350018370540b206f45d577a7083c3ca Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 29 Nov 2005 14:59:23 +0000 Subject: [PATCH] TP importer tweaks. git-svn-id: https://develop.svn.wordpress.org/trunk@3236 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/import/textpattern.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wp-admin/import/textpattern.php b/wp-admin/import/textpattern.php index 9c908bbf98..0944c290a3 100644 --- a/wp-admin/import/textpattern.php +++ b/wp-admin/import/textpattern.php @@ -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')); ?>