From a93a2d05d1701dbb16c507f7948a4e14647150a7 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 23 Aug 2005 20:58:37 +0000 Subject: [PATCH] - fix [ 1225432 ] plainblack.com: print is broken - fix [ 1249882 ] Make page printable in RWG broken - fix [ 1255313 ] r_printable includes index.pl sometimes --- docs/changelog/6.x.x.txt | 6 ++++++ lib/WebGUI/AssetVersioning.pm | 2 +- lib/WebGUI/DateTime.pm | 15 +++++++++++++-- lib/WebGUI/Macro/r_printable.pm | 4 +++- lib/WebGUI/Style.pm | 2 ++ 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index b1f04fb1f..ae209501e 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -4,6 +4,12 @@ - fix [ 1263934 ] 6.6.5 Import Scripts Asset URLs - fix [ 1260760 ] Default endDate in asset table too high for FreeBSD - fix [ 1249486 ] default script language is not declared + - fix [ 1164205 ] TinyMCE files not found by Apache + - fix [ 1038289 ] Performance problems with 6.2 + - fix [ 1236961 ] Admin bar broken on IE under XHTML Transitional DTD + - fix [ 1225432 ] plainblack.com: print is broken + - fix [ 1249882 ] Make page printable in RWG broken + - fix [ 1255313 ] r_printable includes index.pl sometimes 6.7.1 - fix [ 1206046 ] function tinyMCE_WebGUI_Cleanup don't work diff --git a/lib/WebGUI/AssetVersioning.pm b/lib/WebGUI/AssetVersioning.pm index 881c9d9ad..8ceb1c4f0 100644 --- a/lib/WebGUI/AssetVersioning.pm +++ b/lib/WebGUI/AssetVersioning.pm @@ -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.")"); diff --git a/lib/WebGUI/DateTime.pm b/lib/WebGUI/DateTime.pm index 255648f06..965d5dbc5 100644 --- a/lib/WebGUI/DateTime.pm +++ b/lib/WebGUI/DateTime.pm @@ -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; } diff --git a/lib/WebGUI/Macro/r_printable.pm b/lib/WebGUI/Macro/r_printable.pm index fe8af2f96..1ba25fbe3 100644 --- a/lib/WebGUI/Macro/r_printable.pm +++ b/lib/WebGUI/Macro/r_printable.pm @@ -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]); } diff --git a/lib/WebGUI/Style.pm b/lib/WebGUI/Style.pm index 969703b4b..df8beb093 100644 --- a/lib/WebGUI/Style.pm +++ b/lib/WebGUI/Style.pm @@ -119,6 +119,8 @@ sub process { $var{'head.tags'} = ' + +