diff --git a/lib/MT/ImportExport.pm b/lib/MT/ImportExport.pm index 9a1bf5188..7315eaf1d 100644 --- a/lib/MT/ImportExport.pm +++ b/lib/MT/ImportExport.pm @@ -58,7 +58,7 @@ sub import_contents { my $allow_comments = $blog->allow_comments_default; my $allow_pings = $blog->allow_pings_default ? 1 : 0; my $convert_breaks = $param{ConvertBreaks}; - $convert_breaks = $blog->convert_paras if $convert_breaks == -1; + $convert_breaks = $blog->convert_paras unless $convert_breaks; #if $convert_breaks eq -1; my $def_status = $param{default_status} || $blog->status_default; my(%authors, %categories); diff --git a/t/97-impexp.t b/t/97-impexp.t index bce19da2b..5c0aab379 100644 --- a/t/97-impexp.t +++ b/t/97-impexp.t @@ -67,7 +67,7 @@ $param{'Blog'} = $blog; $param{'Callback'} = 1; $param{'ParentAuthor'} = $user; $param{'NewAuthorPassword'} = 'PASSWORD'; -$param{'ConvertBreaks'} = ''; +$param{'ConvertBreaks'} = $blog->convert_paras; $param{'Callback'} = sub { my ($string) = @_; print " $string\n"; 1}; my $result = $ie->import_contents(%param); diff --git a/t/lib/MT/Test.pm b/t/lib/MT/Test.pm index 5e9e6a9f3..f6da0f56d 100644 --- a/t/lib/MT/Test.pm +++ b/t/lib/MT/Test.pm @@ -130,12 +130,12 @@ sub init_app { }; *MT::App::login = sub { my $app = shift; - if ( my $user = $app->param('__test_user') ) { + if ( my $user = $app->query->param('__test_user') ) { # attempting to fake user session if ( !$session_id || $user->name ne $session_username - || $app->param('__test_new_session') ) + || $app->query->param('__test_new_session') ) { $app->start_session( $user, 1 ); $session_id = $app->{session}->id; @@ -144,7 +144,7 @@ sub init_app { else { $app->session_user( $user, $session_id ); } - $app->param( 'magic_token', $session_id ); + $app->query->param( 'magic_token', $session_id ); $app->user($user); return ( $user, 0 ); }