Lines 31-36
my $cgi= new CGI;
Link Here
|
31 |
|
31 |
|
32 |
checkauth($cgi, 0, {circulate => 'circulate_remaining_permissions'}, 'intranet'); |
32 |
checkauth($cgi, 0, {circulate => 'circulate_remaining_permissions'}, 'intranet'); |
33 |
|
33 |
|
|
|
34 |
my $op = $cgi->param('op') || ""; |
34 |
my $biblionumber=$cgi->param('biblionumber'); |
35 |
my $biblionumber=$cgi->param('biblionumber'); |
35 |
my $itemnumber=$cgi->param('itemnumber'); |
36 |
my $itemnumber=$cgi->param('itemnumber'); |
36 |
my $biblioitemnumber=$cgi->param('biblioitemnumber'); |
37 |
my $biblioitemnumber=$cgi->param('biblioitemnumber'); |
Lines 55-76
for ($damaged,$itemlost,$withdrawn) {
Link Here
|
55 |
|
56 |
|
56 |
# modify MARC item if input differs from items table. |
57 |
# modify MARC item if input differs from items table. |
57 |
my $item_changes = {}; |
58 |
my $item_changes = {}; |
58 |
if (defined $itemnotes_nonpublic) { # i.e., itemnotes_nonpublic parameter passed from form |
59 |
if ( $op eq "set_non_public_note" ) { |
59 |
checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); |
60 |
checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); |
60 |
if ((not defined $item_data_hashref->{'itemnotes_nonpublic'}) or $itemnotes_nonpublic ne $item_data_hashref->{'itemnotes_nonpublic'}) { |
61 |
if ((not defined $item_data_hashref->{'itemnotes_nonpublic'}) or $itemnotes_nonpublic ne $item_data_hashref->{'itemnotes_nonpublic'}) { |
61 |
$item_changes->{'itemnotes_nonpublic'} = $itemnotes_nonpublic; |
62 |
$item_changes->{'itemnotes_nonpublic'} = $itemnotes_nonpublic; |
62 |
} |
63 |
} |
63 |
} |
64 |
} |
64 |
elsif (defined $itemnotes) { # i.e., itemnotes parameter passed from form |
65 |
elsif ( $op eq "set_public_note" ) { # i.e., itemnotes parameter passed from form |
65 |
checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); |
66 |
checkauth($cgi, 0, {editcatalogue => 'edit_items'}, 'intranet'); |
66 |
if ((not defined $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) { |
67 |
if ((not defined $item_data_hashref->{'itemnotes'}) or $itemnotes ne $item_data_hashref->{'itemnotes'}) { |
67 |
$item_changes->{'itemnotes'} = $itemnotes; |
68 |
$item_changes->{'itemnotes'} = $itemnotes; |
68 |
} |
69 |
} |
69 |
} elsif ($itemlost ne $item_data_hashref->{'itemlost'}) { |
70 |
} elsif ( $op eq "set_lost" && $itemlost ne $item_data_hashref->{'itemlost'}) { |
70 |
$item_changes->{'itemlost'} = $itemlost; |
71 |
$item_changes->{'itemlost'} = $itemlost; |
71 |
} elsif ($withdrawn ne $item_data_hashref->{'withdrawn'}) { |
72 |
} elsif ( $op eq "set_withdrawn" && $withdrawn ne $item_data_hashref->{'withdrawn'}) { |
72 |
$item_changes->{'withdrawn'} = $withdrawn; |
73 |
$item_changes->{'withdrawn'} = $withdrawn; |
73 |
} elsif ($damaged ne $item_data_hashref->{'damaged'}) { |
74 |
} elsif ( $op eq "set_damaged" && $damaged ne $item_data_hashref->{'damaged'}) { |
74 |
$item_changes->{'damaged'} = $damaged; |
75 |
$item_changes->{'damaged'} = $damaged; |
75 |
} else { |
76 |
} else { |
76 |
#nothings changed, so do nothing. |
77 |
#nothings changed, so do nothing. |
Lines 80-85
elsif (defined $itemnotes) { # i.e., itemnotes parameter passed from form
Link Here
|
80 |
|
81 |
|
81 |
ModItem($item_changes, $biblionumber, $itemnumber); |
82 |
ModItem($item_changes, $biblionumber, $itemnumber); |
82 |
|
83 |
|
83 |
LostItem($itemnumber, 'moredetail') if $itemlost; |
84 |
LostItem($itemnumber, 'moredetail') if $op eq "set_lost"; |
84 |
|
85 |
|
85 |
print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); |
86 |
print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); |