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:
parent
c53352108b
commit
f4401fa9dd
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user