From d168c809dab962bb6fc3a117774989fc01691f51 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Wed, 12 Dec 2007 05:32:28 +0000 Subject: [PATCH] forward porting url extension bugfix from branch --- docs/changelog/7.x.x.txt | 2 ++ lib/WebGUI/Asset.pm | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 2a95c367d..c67847cce 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -12,6 +12,8 @@ 7.4.18 - fix: Auto Request Commit setting creates extra version tag if asset uses requestAutoCommit + - fix: URL extensions (perlDreamer Consulting, LLC.) + http://www.plainblack.com/bugs/tracker/url-extensions - fix: Some urls cause an asset to be inaccessible after creation/editing (perlDreamer Consulting, LLC.) http://www.plainblack.com/bugs/tracker/some-urls-cause-an-asset-to-be-inaccessible-after-creation/editing - fix: Secondary Admin can create user with Admin Privilege (IRC:blacksilver) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 9147c8c77..5ad550a4e 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -592,8 +592,9 @@ 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 - && $self->get("url") eq $self->getId # only add it if we're creating a new url + && !($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 + && $url ne lc($self->getId) # but don't assign it the original time ) { $url .= ".".$self->session->setting->get("urlExtension"); }