From 9c967770eb3cf89cf1b3e03e5e641995d156ff2b Mon Sep 17 00:00:00 2001 From: real_nowhereman Date: Fri, 19 Sep 2008 17:09:53 +0000 Subject: [PATCH] fixed recursive update when deleting in indices --- fp-includes/core/core.entry.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fp-includes/core/core.entry.php b/fp-includes/core/core.entry.php index 0ffd941..7dc5ff7 100755 --- a/fp-includes/core/core.entry.php +++ b/fp-includes/core/core.entry.php @@ -125,8 +125,9 @@ $main =& $this->get_index(); $main->delitem($key); - if (isset($entry['CATEGORIES']) && is_array($entry['CATEGORIES'])) { - foreach ($entry['CATEGORIES'] as $cat) { + $entry = entry_parse($id); + if (isset($entry['categories']) && is_array($entry['categories'])) { + foreach ($entry['categories'] as $cat) { if (!is_numeric($cat)) continue; $this_index =& $this->get_index($cat); $this_index->delitem($key); @@ -639,7 +640,7 @@ if (!io_write_file($f, $str)) { if ($update_index) - $obj->delete($id); + $obj->delete($id, $entry); return false; } else return $id;