From 0101dbdd49788d02c8bd7626be19158f36a93abc Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Fri, 19 Jan 2018 19:37:06 +0100 Subject: [PATCH] Bug fix #604 --- bl-kernel/dbpages.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index e291d326..969e084d 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -439,11 +439,11 @@ class dbPages extends dbJSON // Returns an array with all parents pages key, a parent page is not a child public function getParents() { - $db = $this->getPublishedDB(true) + $this->getStaticDB(true); - foreach ($db as $pageKey) { + $db = $this->getPublishedDB(); + foreach ($db as $key=>$pageKey) { // if the key has slash then is a child if (Text::stringContains($pageKey, '/')) { - unset($db[$pageKey]); + unset($db[$key]); } } return $db; @@ -510,7 +510,7 @@ class dbPages extends dbJSON // Returns string without HTML tags and truncated private function generateSlug($text, $truncateLength=60) { $tmpslug = Text::removeHTMLTags($text); - returns Text::truncate($tmpslug, $truncateLength, ''); + return Text::truncate($tmpslug, $truncateLength, ''); } // Returns TRUE if there are new pages published, FALSE otherwise