RssFeed fixes and cleanups

This commit is contained in:
Graham Knop 2009-04-02 16:24:44 +00:00
parent c1ac5b9761
commit ca4a9add6d
4 changed files with 57 additions and 52 deletions

View file

@ -330,15 +330,10 @@ sub exportAsHtml {
$exportSession->close;
return ($returnCode, $message);
}
# Stash the current session and i18n into the asset so that exportAssetCollateral can
# also write informative messages to the output terminal. :)
$asset->{ '_masterSession' } = $self->session;
$asset->{ '_masteri18n' } = $i18n;
# next, tell the asset that we're exporting, so that it can export any
# of its collateral or other extra data.
eval { $asset->exportAssetCollateral($asset->exportGetUrlAsPath, $args) };
eval { $asset->exportAssetCollateral($asset->exportGetUrlAsPath, $args, $session) };
if($@) {
$returnCode = 0;
$message = $@;
@ -392,7 +387,7 @@ sub exportAsHtml {
#-------------------------------------------------------------------
=head2 exportAssetCollateral ( basePath, params )
=head2 exportAssetCollateral ( basePath, params, [ session ] )
Plug in point for complicated assets (like the CS, the Calendar) to manage
exporting their collateral data like other views, children threads and posts,
@ -413,6 +408,10 @@ particular asset.
A hashref with the quiet, userId, depth, and indexFileName parameters from
L</exportAsHtml>.
=head3 session
The session doing the full export. Can be used to report status messages.
=cut
sub exportAssetCollateral {