From 84f6f5d396fae2988c742d51877e937e265d09bf Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 19 Jan 2009 00:11:08 +0000 Subject: [PATCH] BUGFIX Fixed expanded/unexpanded flags on new tree items - was showing expanded styling (plus icon) with newly created pages git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@70323 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/LeftAndMain.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 8303af71..9eb52b27 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -504,7 +504,7 @@ class LeftAndMain extends Controller { $parentID = (int)$p->ParentID; $id = $p->ID ? $p->ID : "new-$p->class-$p->ParentID"; $treeTitle = Convert::raw2js($p->TreeTitle()); - $hasChildren = is_numeric( $id ) && $p->AllChildren() ? ' unexpanded' : ''; + $hasChildren = (is_numeric($id) && $p->AllChildren() && $p->AllChildren()->Count()) ? ' unexpanded' : ''; // Ensure there is definitly a node avaliable. if not, append to the home tree. $response = <<