merge to 10219

This commit is contained in:
Colin Kuskie 2009-04-08 16:35:31 +00:00
parent ae28bf79c8
commit 4c1307e3d0
194 changed files with 8203 additions and 2134 deletions

View file

@ -317,8 +317,6 @@ sub exportAsHtml {
# tell the user which asset we're exporting.
unless ($quiet) {
my $message = sprintf $i18n->get('exporting page'), $fullPath;
$exportSession->var->end;
$exportSession->close;
$self->session->output->print($message);
}
@ -335,7 +333,7 @@ sub exportAsHtml {
# 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 = $@;
@ -389,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,
@ -410,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 {
@ -541,7 +543,7 @@ sub exportGetUrlAsPath {
my $fileTypes = $config->get('exportBinaryExtensions');
# get the asset's URL as a URI::URL object for easy parsing of components
my $url = URI::URL->new($config->get("sitename")->[0] . $self->getUrl);
my $url = URI::URL->new($self->session->url->getSiteURL . $self->getUrl);
my @pathComponents = $url->path_components;
shift @pathComponents; # first item is the empty string
my $filename = pop @pathComponents;