Fix for bug 2398: Source of Classification - Add item or Edit item in
authorJoshua Ferraro <jmf@liblime.com>
Thu, 24 Jul 2008 21:23:33 +0000 (16:23 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 24 Jul 2008 21:23:33 +0000 (16:23 -0500)
staff client is defaulting to the ASNCR code instead of the blank above

For some reason the loop used to build the list of values was
setting the first value to the $value variable if $value wasn't
set already, and the default_value was inside rather than outside
the loop. I've removed the setting inside the loop and placed
the default value outide the loop. It's possible I just don't
understand what the original intention was.

cataloguing/additem.pl

index da09dd0..4c9ecfc 100755 (executable)
@@ -371,10 +371,9 @@ foreach my $tag (sort keys %{$tagslib}) {
                           ($class_source eq $default_source);
               push @authorised_values, $class_source;
               $authorised_lib{$class_source} = $class_sources->{$class_source}->{'description'};
-              $value = $class_source unless ($value);
-              $value = $default_source unless ($value);
           }
-  
+                 $value = $default_source unless ($value);
+
           #---- "true" authorised value
       }
       else {