From 347cc82a2dfae16fcf41a81a1bec1aa71f4988a5 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Tue, 28 Oct 2008 16:34:47 +0000 Subject: [PATCH] merging the fixurl bug --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset.pm | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index fb0676b34..b8a2ad679 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -150,6 +150,7 @@ 7.5.31 - fixed: debian licensing problem with user list - fixed: Wrong password behaviour (#8905) + - fixed: Duplicate Root URLs Allowed (#8900) - removed the old js file IndexedSearch/ColorPicker2.js that hasn't been used in about 3 years. - Fixed #8984: Weather Asset missing hoverhelp diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 2687b8363..c1e318df0 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -643,6 +643,11 @@ sub fixUrl { $url .= ".".$self->session->setting->get("urlExtension"); } + # make sure the url isn't empty after all that filtering + if ($url eq "") { + $url = $self->getId; + } + # check to see if the url already exists or not, and increment it if it does if ($self->urlExists($self->session, $url, {assetId=>$self->getId})) { my @parts = split(/\./,$url);