bug fixes

This commit is contained in:
JT Smith 2005-12-03 19:25:41 +00:00
parent f7c8807d2d
commit 16da1e3180
2 changed files with 67 additions and 1 deletions

View file

@ -42,8 +42,74 @@ addZipArchive();
updateUserProfileDayLabels();
changeSelectListToSelectBox();
fixVeryLateDates();
updateFolderTemplate();
finish();
#-------------------------------------------------
sub updateFolderTemplate {
print "\tUpdate folder template\n" unless ($quiet);
my $template = <<STOP;
<a name="id<tmpl_var assetId>" id="id<tmpl_var assetId>"></a>
<tmpl_if session.var.adminOn>
<p><tmpl_var controls></p>
</tmpl_if>
<tmpl_if displayTitle>
<h1><tmpl_var title></h1>
</tmpl_if>
<tmpl_if description>
<tmpl_var description>
</tmpl_if>
<tmpl_if session.var.adminOn>
<p><a href="<tmpl_var url>?func=add&class=WebGUI::Asset::FilePile">Add files.</a></p>
</tmpl_if>
<table width="100%" cellpadding="3" cellspacing="0" class="content">
<tmpl_loop subfolder_loop>
<tr>
<td class="tableData" valign="top">
<a href="<tmpl_var url>"><img src="<tmpl_var icon.small>" border="0" alt="<tmpl_var title>" /></a> <a href="<tmpl_var url>"><tmpl_var title></a>
</td>
<td class="tableData" valign="top" colspan="3">
<tmpl_var synopsis>
</td>
</tr>
</tmpl_loop>
<tmpl_loop file_loop>
<tr>
<td valign="top" class="tableData">
<tmpl_if session.var.adminOn>
<tmpl_if canEdit>
<tmpl_var controls>
</tmpl_if>
</tmpl_if>
<a href="<tmpl_var url>"><img src="<tmpl_var icon.small>" border="0" alt="<tmpl_var title>" /></a> <a href="<tmpl_var url>"><tmpl_var title>
</td>
<td class="tableData" valign="top">
<tmpl_var synopsis>
</td>
<td class="tableData" valign="top">
^D("%z %Z",<tmpl_var date.epoch>);
</td>
<td class="tableData" valign="top">
<tmpl_var size>
</td>
</tr>
</tmpl_loop>
</table>
STOP
my $asset = WebGUI::Asset->new("PBtmpl0000000000000078","WebGUI::Asset::Template");
if (defined $asset) {
$asset->addRevision({template=>$template})->commit;
}
}
#-------------------------------------------------
sub addZipArchive {
print "\tAdding Zip Archive Asset\n" unless ($quiet);

View file

@ -98,7 +98,7 @@ sub contentHandler {
}
### form variables
foreach ($session{req}->param) {
$session{form}{$_} = $session{req}->param($_);
$session{form}{$_} = $session{req}->body($_) || $session{req}->param($_);
}
if ($session{env}{HTTP_X_MOZ} eq "prefetch") { # browser prefetch is a bad thing
WebGUI::HTTP::setStatus("403","We don't allow prefetch, because it increases bandwidth, hurts stats, and can break web sites.");