From 6041dc01c02c798ac22bb26a5b93c1c5f3280faf Mon Sep 17 00:00:00 2001 From: JT Smith Date: Fri, 20 Dec 2002 06:38:27 +0000 Subject: [PATCH] Fixed a bug in Site Map where the properties page would not hold the "All Roots" option. --- lib/WebGUI/Wobject/SiteMap.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Wobject/SiteMap.pm b/lib/WebGUI/Wobject/SiteMap.pm index 599b2cfda..5110f32e4 100644 --- a/lib/WebGUI/Wobject/SiteMap.pm +++ b/lib/WebGUI/Wobject/SiteMap.pm @@ -78,8 +78,12 @@ sub set { #------------------------------------------------------------------- sub www_edit { return WebGUI::Privilege::insufficient() unless (WebGUI::Privilege::canEditPage()); - my ($output, $f, $indent); - my $startLevel = $_[0]->get("startAtThisLevel") || 1; + my ($output, $f, $indent, $startLevel); + if ($_[0]->get("wobjectId") eq "new") { + $startLevel = 1; + } else { + $startLevel = $_[0]->get("startAtThisLevel"); + } my $options = WebGUI::SQL->buildHashRef("select pageId,title from page where parentId=0 and (pageId=1 or pageId>999) order by title"); $indent = $_[0]->get("indent") || 5;