diff --git a/lib/WebGUI/Asset/Wobject/StoryArchive.pm b/lib/WebGUI/Asset/Wobject/StoryArchive.pm index c33fa526f..d11f62f88 100644 --- a/lib/WebGUI/Asset/Wobject/StoryArchive.pm +++ b/lib/WebGUI/Asset/Wobject/StoryArchive.pm @@ -196,7 +196,7 @@ sub exportAssetCollateral { } # open another session to handle printing... - my $printSession = WebGUI::Session->duplicate; + my $printSession = $self->session->duplicate; my $keywordObj = WebGUI::Keyword->new($printSession); my $keywords = $keywordObj->findKeywords({ diff --git a/lib/WebGUI/Role/Asset/RssFeed.pm b/lib/WebGUI/Role/Asset/RssFeed.pm index c3c6216b8..34b776524 100644 --- a/lib/WebGUI/Role/Asset/RssFeed.pm +++ b/lib/WebGUI/Role/Asset/RssFeed.pm @@ -165,9 +165,10 @@ The session doing the full export. Can be used to report status messages. =cut -sub exportAssetCollateral { +around exportAssetCollateral => sub { # Lots of copy/paste here from AssetExportHtml.pm, since none of the methods there were # directly useful without ginormous refactoring. + my $orig = shift; my $self = shift; my $basepath = shift; my $args = shift; @@ -209,7 +210,7 @@ sub exportAssetCollateral { $reportSession->output->print( '      ' . $message . '
'); } - my $exportSession = WebGUI::Session->duplicate; + my $exportSession = $self->session->duplicate; # open another session as the user doing the exporting... my $selfdupe = WebGUI::Asset->newById( $exportSession, $self->getId ); @@ -242,8 +243,8 @@ sub exportAssetCollateral { $reportSession->output->print($reporti18n->get('done')); } } - return $self->next::method($basepath, $args, $reportSession); -} + return $self->$orig(@_); +}; #-------------------------------------------------------------------