inc/record.inc.php
changeset 111 0a2342a64b83
parent 106 41d05ff53708
child 115 b1d7998a903e
equal deleted inserted replaced
110:455405c757e1 111:0a2342a64b83
    93 
    93 
    94 	$user_is_zone_owner = verify_user_is_owner_zoneid($record['zid']);
    94 	$user_is_zone_owner = verify_user_is_owner_zoneid($record['zid']);
    95 	$zone_type = get_domain_type($record['zid']);
    95 	$zone_type = get_domain_type($record['zid']);
    96 
    96 
    97 	if ( $zone_type == "SLAVE" || $perm_content_edit == "none" || $perm_content_edit == "own" && $user_is_zone_owner == "0" ) {
    97 	if ( $zone_type == "SLAVE" || $perm_content_edit == "none" || $perm_content_edit == "own" && $user_is_zone_owner == "0" ) {
    98 		return _("You are not allowed to edit this record.") ; 
    98 		error(ERR_PERM_EDIT_RECORD);
       
    99 		return false;
    99 	} else {
   100 	} else {
   100 		if($record['content'] == "") {
   101 		if($record['content'] == "") {
   101 			return _("Error: content field may not be empty.") ; 
   102 			error(ERR_DNS_CONTENT);
       
   103 			return false;
   102 		}
   104 		}
   103 		global $db;
   105 		global $db;
   104 		// TODO: no need to check for numeric-ness of zone id if we check with validate_input as well?
   106 		// TODO: no need to check for numeric-ness of zone id if we check with validate_input as well?
   105 		if (is_numeric($record['zid'])) {
   107 		if (is_numeric($record['zid'])) {
   106 			validate_input($record['zid'], $record['type'], $record['content'], $record['name'], $record['prio'], $record['ttl']);
   108 			validate_input($record['zid'], $record['type'], $record['content'], $record['name'], $record['prio'], $record['ttl']);