fixed changelog and some formatting issues

This commit is contained in:
Doug Bell 2007-02-01 20:24:00 +00:00
parent 6edfd18072
commit 6e8547169a
5 changed files with 49 additions and 22 deletions

View file

@ -40,6 +40,7 @@
- fix: EMS: blank lines appearing in registrants. Note - this fix requires - fix: EMS: blank lines appearing in registrants. Note - this fix requires
the use of new template variables in the EMS checkout template. See the use of new template variables in the EMS checkout template. See
gotchas.txt for details. gotchas.txt for details.
- fix: AssetExportHtml now handles periods in URLs more gracefully.
7.3.8 7.3.8
- Fixed a template variable rewriting problem with HTML::Template::Expr - Fixed a template variable rewriting problem with HTML::Template::Expr

View file

@ -104,7 +104,8 @@ sub _exportAsHtml {
# Get a list of the asset IDs we need, reverse sorted by URL # Get a list of the asset IDs we need, reverse sorted by URL
my $assetIds my $assetIds
= $newSelf->getLineage(["self","descendants"],{ = $newSelf->getLineage(["self","descendants"],{
endingLineageLength => $newSelf->getLineageLength+$self->session->form->process("depth") endingLineageLength => $newSelf->getLineageLength+$self->session->form->process("depth"),
orderByClause => 'assetData.url DESC',
}); });
$tempSession->var->end; $tempSession->var->end;
@ -138,27 +139,41 @@ sub _exportAsHtml {
$defaultAssetPath = $fullPath; $defaultAssetPath = $fullPath;
} }
# Make sure that the filename is not a directory in this path
if (-d $exportPath . "/" . $fullPath) {
# A previous asset created this directory
# so make this asset the index of this directory
if (!-e "$exportPath/$fullPath/$index") {
$path .= "/$filename";
$filename = $index;
$fullPath .= "/$index";
}
else {
return (0, sprintf($i18n->get('file exists when making directory index'), $fullPath, $@));
}
}
$self->session->db->write("UPDATE asset SET lastExportedAs = ? WHERE assetId = ?", [$fullPath, $asset->getId]); $self->session->db->write("UPDATE asset SET lastExportedAs = ? WHERE assetId = ?", [$fullPath, $asset->getId]);
$path = $exportPath . (length($path)? "/$path" : ""); $path = $exportPath . (length($path)? "/$path" : "");
eval { mkpath($path) }; eval { mkpath($path) };
if($@) { if($@) {
return (0, sprintf($i18n->get('could not create path'), $path, $@)); return (0, sprintf($i18n->get('could not create path'), $path, $@));
} }
$path .= "/".$filename; $path .= "/".$filename;
my $file = eval { FileHandle->new(">".$path) or die "$!" }; my $file = eval { FileHandle->new(">".$path) or die "$!" };
if ($@) { if ($@) {
return (0, sprintf($i18n->get('could not open path'), $path, $@)); return (0, sprintf($i18n->get('could not open path'), $path, $@));
} else { } else {
$assetSession->output->setHandle($file); $assetSession->output->setHandle($file);
$assetSession->asset($asset); $assetSession->asset($asset);
my $content = $asset->exportHtml_view; my $content = $asset->exportHtml_view;
unless ($content eq "chunked") { unless ($content eq "chunked") {
$assetSession->output->print($content); $assetSession->output->print($content);
} }
$file->close; $file->close;
} }
$assetSession->var->end; $assetSession->var->end;
$assetSession->close; $assetSession->close;
@ -384,8 +399,9 @@ Executes the export process and displays real time status. This operation is dis
sub www_exportGenerate { sub www_exportGenerate {
my $self = shift; my $self = shift;
return $self->session->privilege->insufficient() unless ($self->session->user->isInGroup(13)); return $self->session->privilege->insufficient() unless ($self->session->user->isInGroup(13));
# This routine is called in an IFRAME and prints status output directly to the browser. # This routine is called in an IFRAME and prints status output directly to the browser.
$|++; # Unbuffered data output $|++; # Unbuffered data output
$self->session->style->useEmptyStyle(1);
$self->session->http->sendHeader; $self->session->http->sendHeader;
my $i18n = WebGUI::International->new($self->session, 'Asset'); my $i18n = WebGUI::International->new($self->session, 'Asset');

View file

@ -36,6 +36,7 @@ This is a mixin package for WebGUI::Asset that contains all versioning related f
# TODO: Add usage for all methods available from this class # TODO: Add usage for all methods available from this class
=head1 METHODS =head1 METHODS
These methods are available from this class: These methods are available from this class:

View file

@ -400,11 +400,13 @@ sub setScript {
=head2 useEmptyStyle ( boolean ) =head2 useEmptyStyle ( boolean )
Tells the style system to use an empty style rather than outputing the normal style. This is useful when you want your code to dynamically generate a style. Tells the style system to use an empty style rather than outputing the normal
style. This is useful when you want your code to dynamically generate a style.
=head3 boolean =head3 boolean
If set to 1 it will use an empty style, if set to 0 it will use the regular style. Defaults to 0. If set to 1 it will use an empty style, if set to 0 it will use the regular
style. Defaults to 0.
=cut =cut

View file

@ -854,6 +854,13 @@ config file must be enabled for this function to be available.</p>
lastUpdated => 1129420080, lastUpdated => 1129420080,
}, },
'file exists when making directory index' => {
message => q{Couldn't create %-s because %-s <br />}
. q{This most likely means you have a page with this URL already. }
. q{Altering that page's URL to not end with your directory index will fix this.},
lastUpdated => 0,
},
'could not create path' => { 'could not create path' => {
message => q| message => q|
Couldn't create %-s because %-s <br /> Couldn't create %-s because %-s <br />