# HG changeset patch # User rejo # Date 1206997819 0 # Node ID 982f722376b4ad99dbc6013b1db44c685d0e225a # Parent f74e4f88b6809962d915a7f7d5a46e355f4c4bb0 [feladat @ 223] Bugfix. No domain id was provided when entering 'edit record' page from a search query. Changed code so 'edit record' does not rely on domain id provided by user but determines it from the record id that is about to be changed. This closes ticket:31. diff -r f74e4f88b680 -r 982f722376b4 edit_record.php --- a/edit_record.php Mon Mar 31 06:43:38 2008 +0000 +++ b/edit_record.php Mon Mar 31 21:10:19 2008 +0000 @@ -34,9 +34,11 @@ elseif (verify_permission(zone_meta_edit_own)) { $perm_meta_edit = "own" ; } else { $perm_meta_edit = "none" ; } -$user_is_zone_owner = verify_user_is_owner_zoneid($_GET["domain"]); -$zone_type = get_domain_type($_GET["domain"]); -$zone_name = get_domain_name_from_id($_GET["domain"]); +$zid = get_zone_id_from_record_id($_GET["id"]); + +$user_is_zone_owner = verify_user_is_owner_zoneid($zid); +$zone_type = get_domain_type($zid); +$zone_name = get_domain_name_from_id($zid); if ($_POST["commit"]) { if ( $zone_type == "SLAVE" || $perm_content_edit == "none" || $perm_content_edit == "own" && $user_is_zone_owner == "0" ) { @@ -57,7 +59,7 @@ error(ERR_PERM_VIEW_RECORD); } else { $record = get_record_from_id($_GET["id"]); - echo "