- fix [ 1225432 ] plainblack.com: print is broken

- fix [ 1249882 ] Make page printable in RWG broken
 - fix [ 1255313 ] r_printable includes index.pl sometimes
This commit is contained in:
JT Smith 2005-08-23 20:58:37 +00:00
parent 506b16a8a0
commit a93a2d05d1
5 changed files with 25 additions and 4 deletions

View file

@ -60,7 +60,7 @@ sub addRevision {
my $status = $session{setting}{autoCommit} ? 'approved' : 'pending';
WebGUI::SQL->write("insert into assetData (assetId, revisionDate, revisedBy, tagId, status, url, startDate, endDate,
ownerUserId, groupIdEdit, groupIdView) values (".quote($self->getId).",".$now.", ".quote($session{user}{userId}).",
".quote($versionTag).", ".quote($status).", ".quote($self->getId).", 997995720, 9223372036854775807,'3','3','7')");
".quote($versionTag).", ".quote($status).", ".quote($self->getId).", 997995720, 32472169200,'3','3','7')");
foreach my $definition (@{$self->definition}) {
unless ($definition->{tableName} eq "assetData") {
WebGUI::SQL->write("insert into ".$definition->{tableName}." (assetId,revisionDate) values (".quote($self->getId).",".$now.")");

View file

@ -68,11 +68,22 @@ These functions are available from this package:
sub epochToDate {
my $secs = shift;
return &ParseDateString("epoch $secs");
my $cache = WebGUI::Cache->new(["epochToDate",$secs],"DateTime");
my $value = $cache->get;
return $value if ($value);
my $converted = &ParseDateString("epoch $secs");
$cache->set($converted);
return $converted;
}
sub dateToEpoch {
return &UnixDate(shift,"%s");
my $date = shift;
my $cache = WebGUI::Cache->new(["dateToEpoch",$date],"DateTime");
my $value = $cache->get;
return $value if ($value);
my $converted = &UnixDate($date,"%s");
$cache->set($converted);
return $converted;
}

View file

@ -26,7 +26,9 @@ sub process {
if ($session{env}{REQUEST_URI} =~ /op\=/) {
$append = 'op2='.WebGUI::URL::escape($append);
}
$temp = WebGUI::URL::append($session{env}{REQUEST_URI},$append);
$temp = WebGUI::URL::gateway($session{env}{PATH_INFO},$append);
$temp =~ s/\/\//\//;
$temp = WebGUI::URL::append($temp,$session{env}{QUERY_STRING});
if ($param[1] ne "") {
$temp = WebGUI::URL::append($temp,'styleId='.$param[1]);
}

View file

@ -119,6 +119,8 @@ sub process {
$var{'head.tags'} = '
<meta name="generator" content="WebGUI '.$WebGUI::VERSION.'" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<script type="text/javascript">
function getWebguiProperty (propName) {
var props = new Array();