This commit is contained in:
Diego Najar 2018-01-19 19:37:06 +01:00
parent ecf9b8e3f1
commit 0101dbdd49
1 changed files with 4 additions and 4 deletions

View File

@ -439,11 +439,11 @@ class dbPages extends dbJSON
// Returns an array with all parents pages key, a parent page is not a child // Returns an array with all parents pages key, a parent page is not a child
public function getParents() public function getParents()
{ {
$db = $this->getPublishedDB(true) + $this->getStaticDB(true); $db = $this->getPublishedDB();
foreach ($db as $pageKey) { foreach ($db as $key=>$pageKey) {
// if the key has slash then is a child // if the key has slash then is a child
if (Text::stringContains($pageKey, '/')) { if (Text::stringContains($pageKey, '/')) {
unset($db[$pageKey]); unset($db[$key]);
} }
} }
return $db; return $db;
@ -510,7 +510,7 @@ class dbPages extends dbJSON
// Returns string without HTML tags and truncated // Returns string without HTML tags and truncated
private function generateSlug($text, $truncateLength=60) { private function generateSlug($text, $truncateLength=60) {
$tmpslug = Text::removeHTMLTags($text); $tmpslug = Text::removeHTMLTags($text);
returns Text::truncate($tmpslug, $truncateLength, ''); return Text::truncate($tmpslug, $truncateLength, '');
} }
// Returns TRUE if there are new pages published, FALSE otherwise // Returns TRUE if there are new pages published, FALSE otherwise