From 28323b9f54010e2ccd1dc4c4e6259ceb5cb074f8 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 15 Sep 2004 19:50:27 +0000 Subject: [PATCH] indent bug fixed --- docs/changelog/6.x.x.txt | 1 + lib/WebGUI/Operation/Page.pm | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 4ab8df042..4909c304c 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,6 +1,7 @@ 6.2.3 - Changed to new POD format. - Fixed GUID related bugs in search indexer and passive profiling. + - Fixed a bug in page tree where indenting wasn't working. 6.2.2 diff --git a/lib/WebGUI/Operation/Page.pm b/lib/WebGUI/Operation/Page.pm index 174efaa99..ca5e27fbc 100644 --- a/lib/WebGUI/Operation/Page.pm +++ b/lib/WebGUI/Operation/Page.pm @@ -170,6 +170,7 @@ sub _selectPositions { } #------------------------------------------------------------------- + =head2 _traversePageTree( pageId [, initialDepth ] ) Walks down the page tree from page with id pageId and returns an indented list of the pages it @@ -184,8 +185,9 @@ The id of the page you want to start from The depth the tree should start with. Defaults to zero. =cut + sub _traversePageTree { - my (%wobject, $output, $spacer, $page, $currentPage, $options, $currentPageId, $currentUrlizedTitle, $wobjects); + my (%wobject, $output, $spacer, $page, $currentPage, $currentPageId, $currentUrlizedTitle, $wobjects); my ($parentId, $initialDepth) = @_; tie %wobject, 'Tie::CPHash'; @@ -193,7 +195,7 @@ sub _traversePageTree { my $sth = WebGUI::SQL->read("select pageId,isSystem,urlizedTitle,title from page where parentId=".quote($parentId)); while (my ($pageId,$isSystem,$url,$title) = $sth->array) { unless ($isSystem) { - $output .= $spacer x $options->{_depth} + $output .= $spacer x $initialDepth .pageIcon() .deleteIcon('op=deletePage',$url) .moveLeftIcon(sprintf('op=moveTreePageLeft&pageId=%s',$pageId), $url) @@ -204,7 +206,7 @@ sub _traversePageTree { .' '.$title.'
'; $wobjects = WebGUI::SQL->read("select wobjectId,title from wobject where pageId=".quote($pageId)); while (%wobject = $wobjects->hash) { - $output .= $spacer x $options->{_depth} . $spacer + $output .= $spacer x $initialDepth. $spacer .wobjectIcon() .deleteIcon('func=delete&wid='.$wobject{wobjectId},$url) .editIcon('func=edit&wid='.$wobject{wobjectId},$url)