From 1e08891ebf90d491796026f8347519fe485e07d2 Mon Sep 17 00:00:00 2001 From: rWatcher Date: Tue, 19 Jan 2010 01:25:11 -0500 Subject: [PATCH] Fixed issue where the delete button deletes the whole table instead of just one record. --- modules/tagsmap/controllers/admin_tagsmap.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/tagsmap/controllers/admin_tagsmap.php b/modules/tagsmap/controllers/admin_tagsmap.php index d461de37..c0af4bea 100644 --- a/modules/tagsmap/controllers/admin_tagsmap.php +++ b/modules/tagsmap/controllers/admin_tagsmap.php @@ -68,10 +68,8 @@ class Admin_TagsMap_Controller extends Admin_Controller { // If the tag no longer exists then delete the record. if (count($oneTag) == 0) { - // Delete the record. - ORM::factory("tags_gps") - ->where("tag_id", "=", $oneGPS->tag_id) - ->delete_all(); + // Delete the record. + db::build()->delete("tags_gpses")->where("tag_id", "=", $oneGPS->tag_id)->execute(); $int_deleted_records++; } } @@ -100,9 +98,7 @@ class Admin_TagsMap_Controller extends Admin_Controller { // Delete the GSP data associated with a tag. // Delete the record. - ORM::factory("tags_gps") - ->where("tag_id", "=", $tag_id) - ->delete_all(); + db::build()->delete("tags_gpses")->where("tag_id", "=", $tag_id)->execute(); // Redirect back to the main screen and display a "success" message. message::success(t("Your Settings Have Been Saved."));