TP importer tweaks.
git-svn-id: https://develop.svn.wordpress.org/trunk@3236 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b948ca459f
commit
5bbfb57635
|
@ -21,9 +21,6 @@ $txpcfg['table_prefix'] = '';
|
||||||
|
|
||||||
// STOP EDITING
|
// STOP EDITING
|
||||||
|
|
||||||
add_option('tpre',$txpcfg['table_prefix']);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Add These Functions to make our lives easier
|
Add These Functions to make our lives easier
|
||||||
**/
|
**/
|
||||||
|
@ -604,6 +601,8 @@ class Textpattern_Import {
|
||||||
|
|
||||||
function dispatch()
|
function dispatch()
|
||||||
{
|
{
|
||||||
|
global $txpdb, $txpcfg;
|
||||||
|
|
||||||
if (empty ($_GET['step']))
|
if (empty ($_GET['step']))
|
||||||
$step = 0;
|
$step = 0;
|
||||||
else
|
else
|
||||||
|
@ -611,6 +610,11 @@ class Textpattern_Import {
|
||||||
|
|
||||||
$this->header();
|
$this->header();
|
||||||
|
|
||||||
|
if ( $step > 0 ) {
|
||||||
|
add_option('tpre',$txpcfg['table_prefix']);
|
||||||
|
$txpdb = new wpdb($txpcfg['user'], $txpcfg['pass'], $txpcfg['db'], $txpcfg['host']);
|
||||||
|
}
|
||||||
|
|
||||||
switch ($step)
|
switch ($step)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
|
@ -646,8 +650,6 @@ class Textpattern_Import {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$txpdb = new wpdb($txpcfg['user'], $txpcfg['pass'], $txpcfg['db'], $txpcfg['host']);
|
|
||||||
|
|
||||||
$txp_import = new Textpattern_Import();
|
$txp_import = new Textpattern_Import();
|
||||||
register_importer('textpattern', 'Textpattern', __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));
|
register_importer('textpattern', 'Textpattern', __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue