fixed recursive update when deleting in indices
This commit is contained in:
parent
993c58fc4e
commit
9c967770eb
@ -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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user