From bdf8aa82463f53d3fc4c4bcf3479b2b6c7a60383 Mon Sep 17 00:00:00 2001 From: Kaleb Murphy Date: Tue, 25 Nov 2008 18:15:45 +0000 Subject: [PATCH] Adding a file extension for URLs in the system settings now properly affects newly created Assets. It still does not update existing asset URL's. --- docs/changelog/7.x.x.txt | 2 +- lib/WebGUI/Asset.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 6287d30d0..487af760f 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -4,7 +4,7 @@ - fixed: #9147: Misspellings in Account - fixed: #9148: Account: account links do not work - fixed: #9149: Account: default templates do not work right - + - fixed: Adding a file extension for URLs in the system settings now properly affects newly created Assets. It still does not update existing asset URL's. 7.6.4 - Survey now will show progress and time limit. - Brand new Survey system. Make sure to export your old results as they will diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 8c7af54dd..62fdd3f6d 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -645,7 +645,7 @@ sub fixUrl { # add automatic extension if we're supposed to if ($self->session->setting->get("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 - && lc($self->get("url")) eq lc($self->getId) # only add it if we're creating a new url + && !$self->get("url") # Only add it if this is a new asset. && $url ne lc($self->getId) # but don't assign it the original time ) { $url .= ".".$self->session->setting->get("urlExtension");