Gossamer Forum
Home : Products : DBMan : Customization :

Question about a certain block of code in mult. modify mod...

Quote Reply
Question about a certain block of code in mult. modify mod...
When I implemented the posted multiple modify mod from the board, it gave me a validation error for every one of my fields, just like in the question following the mod post. After looking over the mod itself, and Carols fix to the invalid records error (status = "ok" Wink, I noticed that implementing that error looks like it ceases all validation for any records upon modification! Is this true? The original line of code is:
$status = &validate_multiple_records (%rec);

My guess as to the cause of the error is that none of the fields from the code:

LINE: foreach $line (@lines) {
if ($line =~ /^$/) { next LINE; }
if ($line =~ /^#/) { $output .= $line; next LINE; }
chomp ($line);
(@data) = &split_decode($line);
if ($modify_list{$data[$db_key_pos]}) {
foreach $key (keys %in) {
if ($key =~ /^\Q$data[$db_key_pos]\E-(.*)$/) {
$rec{$1} = $in{$key};
}
}

passed the actual records to %rec, thereby, messing up the input for the multiple records validation routine.

Carol, what do you think?

- Leam