Fixing the thai double up
[koha.git] / cataloguing / additem.pl
index 5af5399..e4c30e3 100755 (executable)
@@ -283,7 +283,7 @@ foreach my $tag (sort keys %{$tagslib}) {
     my ($x,$value);
     ($x,$value) = find_value($tag,$subfield,$itemrecord) if ($itemrecord);
     $value =~ s/"/"/g;
-    unless ($value) {
+    if ( ! defined( $value ) || $value eq '')  {
         $value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
         # get today date & replace YYYY, MM, DD if provided in the default value
         my ( $year, $month, $day ) = split ',', $today_iso;     # FIXME: iso dates don't have commas!
@@ -442,6 +442,7 @@ $template->param(
     itemtagsubfield  => $itemtagsubfield,
     op      => $nextop,
     opisadd => ($nextop eq "saveitem") ? 0 : 1,
+    C4::Search::enabled_staff_search_views,
 );
 foreach my $error (@errors) {
     $template->param($error => 1);