From a1471d17b6e45762258dfeccb1a6da899e6a63af Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 23 Aug 2005 19:59:24 +0000 Subject: [PATCH] bugfix [ 1263934 ] 6.6.5 Import Scripts Asset URLs --- docs/changelog/6.x.x.txt | 3 ++- lib/WebGUI/Asset.pm | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 0cdf65743..cf00533e2 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,6 +1,7 @@ 6.7.2 - fix [ 1265788 ] SyndicatedContent *not working* in 6.7.x - - fix [ 1245765 ] Missing 'page not found' crashes settings + - fix [ 1245765 ] Missing 'page not found' crashes settings + - fix [ 1263934 ] 6.6.5 Import Scripts Asset URLs 6.7.1 - fix [ 1206046 ] function tinyMCE_WebGUI_Cleanup don't work diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index af900180e..c947d68cf 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -283,7 +283,10 @@ sub fixUrl { if (length($url) > 250) { $url = substr($url,220); } - if ($session{setting}{urlExtension} ne "" && !($url =~ /\./)) { + if ($session{setting}{urlExtension} ne "" #don't add an extension if one isn't set + && !($url =~ /\./) #don't add an extension of the url already contains a dot + && $self->get("url") eq $self->getId # only add it if we're creating a new url + ) { $url .= ".".$session{setting}{urlExtension}; } my ($test) = WebGUI::SQL->quickArray("select url from assetData where assetId<>".quote($self->getId)." and url=".quote($url));