1
0

Fixed another "minor" bug that caused the entire contents of the items_faces table to get deleted whenever a face-tagged photo is deleted.

This commit is contained in:
rWatcher 2010-01-12 03:17:36 -05:00
parent c53352108b
commit f4401fa9dd

View File

@ -58,18 +58,24 @@ class tagfaces_event_Core {
->where("item_id", "=", $item->id)
->find_all();
if (count($existingFaces) > 0) {
/*
ORM::factory("items_face")
->where("item_id", "=", $item->id)
->delete_all();
*/
db::build()->delete("items_faces")->where("item_id", "=", $item->id)->execute();
}
$existingNotes = ORM::factory("items_note")
->where("item_id", "=", $item->id)
->find_all();
if (count($existingNotes) > 0) {
/*
ORM::factory("items_note")
->where("item_id", "=", $item->id)
->delete_all();
*/
db::build()->delete("items_notes")->where("item_id", "=", $item->id)->execute();
}
}
}