Fixed "minor" bug that caused the entire contents of the items_faces table to get deleted.
This commit is contained in:
parent
744a6b6cc7
commit
2fa96fe8a9
@ -62,18 +62,22 @@ class tagfaces_Controller extends Controller {
|
|||||||
|
|
||||||
// Delete the face(s) from the database.
|
// Delete the face(s) from the database.
|
||||||
foreach ($tag_data as $one_tag) {
|
foreach ($tag_data as $one_tag) {
|
||||||
ORM::factory("items_face")
|
//ORM::factory("items_face")
|
||||||
->where("id", "=", $one_tag)
|
// ->where("id", "=", $one_tag)
|
||||||
->delete_all();
|
// ->delete();
|
||||||
|
db::build()->delete("items_faces")->where("id", "=", $one_tag)->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Delete the notes(s) from the database.
|
// Delete the notes(s) from the database.
|
||||||
foreach ($note_data as $one_note) {
|
foreach ($note_data as $one_note) {
|
||||||
ORM::factory("items_note")
|
//ORM::factory("items_note")
|
||||||
->where("id", "=", $one_note)
|
// ->where("id", "=", $one_note)
|
||||||
->delete_all();
|
// ->delete();
|
||||||
|
db::build()->delete("items_notes")->where("id", "=", $one_note)->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Display a success message for deleted faces.
|
// Display a success message for deleted faces.
|
||||||
if (count($tag_data) == 1) {
|
if (count($tag_data) == 1) {
|
||||||
message::success(t("One face deleted."));
|
message::success(t("One face deleted."));
|
||||||
|
Reference in New Issue
Block a user