From 1a2e2a1d985182f7649d00cbe6cec4e728d9f262 Mon Sep 17 00:00:00 2001 From: Saophalkun Ponlu Date: Mon, 3 Aug 2009 23:37:03 +0000 Subject: [PATCH] BUGFIX: prevet calling loadDescendantBlogHolderIDListInto() on BlogPage and its subclass --- code/BlogTree.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/BlogTree.php b/code/BlogTree.php index 9007673..74a608c 100644 --- a/code/BlogTree.php +++ b/code/BlogTree.php @@ -121,8 +121,12 @@ class BlogTree extends Page { foreach($children as $child) { if (in_array($child->ID, $idList)) continue; - if ($child instanceof BlogHolder) $idList[] = $child->ID; - else $child->loadDescendantBlogHolderIDListInto($idList); + if ($child instanceof BlogHolder) { + $idList[] = $child->ID; + } + else if ($child instanceof BlogTree) { + $child->loadDescendantBlogHolderIDListInto($idList); + } } } }