Fixed issue where the delete button deletes the whole table instead of just one record.
This commit is contained in:
parent
73f04804f8
commit
1e08891ebf
@ -69,9 +69,7 @@ class Admin_TagsMap_Controller extends Admin_Controller {
|
|||||||
// If the tag no longer exists then delete the record.
|
// If the tag no longer exists then delete the record.
|
||||||
if (count($oneTag) == 0) {
|
if (count($oneTag) == 0) {
|
||||||
// Delete the record.
|
// Delete the record.
|
||||||
ORM::factory("tags_gps")
|
db::build()->delete("tags_gpses")->where("tag_id", "=", $oneGPS->tag_id)->execute();
|
||||||
->where("tag_id", "=", $oneGPS->tag_id)
|
|
||||||
->delete_all();
|
|
||||||
$int_deleted_records++;
|
$int_deleted_records++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -100,9 +98,7 @@ class Admin_TagsMap_Controller extends Admin_Controller {
|
|||||||
// Delete the GSP data associated with a tag.
|
// Delete the GSP data associated with a tag.
|
||||||
|
|
||||||
// Delete the record.
|
// Delete the record.
|
||||||
ORM::factory("tags_gps")
|
db::build()->delete("tags_gpses")->where("tag_id", "=", $tag_id)->execute();
|
||||||
->where("tag_id", "=", $tag_id)
|
|
||||||
->delete_all();
|
|
||||||
|
|
||||||
// Redirect back to the main screen and display a "success" message.
|
// Redirect back to the main screen and display a "success" message.
|
||||||
message::success(t("Your Settings Have Been Saved."));
|
message::success(t("Your Settings Have Been Saved."));
|
||||||
|
Reference in New Issue
Block a user