fixed recursive update when deleting in indices

This commit is contained in:
real_nowhereman 2008-09-19 17:09:53 +00:00
parent 993c58fc4e
commit 9c967770eb

View File

@ -125,8 +125,9 @@
$main =& $this->get_index(); $main =& $this->get_index();
$main->delitem($key); $main->delitem($key);
if (isset($entry['CATEGORIES']) && is_array($entry['CATEGORIES'])) { $entry = entry_parse($id);
foreach ($entry['CATEGORIES'] as $cat) { if (isset($entry['categories']) && is_array($entry['categories'])) {
foreach ($entry['categories'] as $cat) {
if (!is_numeric($cat)) continue; if (!is_numeric($cat)) continue;
$this_index =& $this->get_index($cat); $this_index =& $this->get_index($cat);
$this_index->delitem($key); $this_index->delitem($key);
@ -639,7 +640,7 @@
if (!io_write_file($f, $str)) { if (!io_write_file($f, $str)) {
if ($update_index) if ($update_index)
$obj->delete($id); $obj->delete($id, $entry);
return false; return false;
} else return $id; } else return $id;