Lines 29-35
use C4::Koha qw(
Link Here
|
29 |
GetNormalizedUPC |
29 |
GetNormalizedUPC |
30 |
); |
30 |
); |
31 |
use C4::Members; |
31 |
use C4::Members; |
32 |
use C4::Output qw( pagination_bar output_html_with_http_headers ); |
32 |
use C4::Output qw( pagination_bar output_html_with_http_headers output_and_exit_if_error ); |
33 |
use C4::XSLT qw( XSLTParse4Display ); |
33 |
use C4::XSLT qw( XSLTParse4Display ); |
34 |
|
34 |
|
35 |
use Koha::Biblios; |
35 |
use Koha::Biblios; |
Lines 63-68
if ( $op eq 'add_form' ) {
Link Here
|
63 |
# Only pass default |
63 |
# Only pass default |
64 |
$shelf = { allow_change_from_owner => 1 }; |
64 |
$shelf = { allow_change_from_owner => 1 }; |
65 |
} elsif ( $op eq 'edit_form' ) { |
65 |
} elsif ( $op eq 'edit_form' ) { |
|
|
66 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
66 |
$shelfnumber = $query->param('shelfnumber'); |
67 |
$shelfnumber = $query->param('shelfnumber'); |
67 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
68 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
68 |
|
69 |
|
Lines 78-83
if ( $op eq 'add_form' ) {
Link Here
|
78 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
79 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
79 |
} |
80 |
} |
80 |
} elsif ( $op eq 'add' ) { |
81 |
} elsif ( $op eq 'add' ) { |
|
|
82 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
81 |
my $allow_changes_from = $query->param('allow_changes_from'); |
83 |
my $allow_changes_from = $query->param('allow_changes_from'); |
82 |
eval { |
84 |
eval { |
83 |
$shelf = Koha::Virtualshelf->new( |
85 |
$shelf = Koha::Virtualshelf->new( |
Lines 103-108
if ( $op eq 'add_form' ) {
Link Here
|
103 |
$op = 'view'; |
105 |
$op = 'view'; |
104 |
} |
106 |
} |
105 |
} elsif ( $op eq 'edit' ) { |
107 |
} elsif ( $op eq 'edit' ) { |
|
|
108 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
106 |
$shelfnumber = $query->param('shelfnumber'); |
109 |
$shelfnumber = $query->param('shelfnumber'); |
107 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
110 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
108 |
|
111 |
|
Lines 133-138
if ( $op eq 'add_form' ) {
Link Here
|
133 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
136 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
134 |
} |
137 |
} |
135 |
} elsif ( $op eq 'delete' ) { |
138 |
} elsif ( $op eq 'delete' ) { |
|
|
139 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
136 |
$shelfnumber = $query->param('shelfnumber'); |
140 |
$shelfnumber = $query->param('shelfnumber'); |
137 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
141 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
138 |
if ($shelf) { |
142 |
if ($shelf) { |
Lines 151-156
if ( $op eq 'add_form' ) {
Link Here
|
151 |
} |
155 |
} |
152 |
$op = 'list'; |
156 |
$op = 'list'; |
153 |
} elsif ( $op eq 'add_biblio' ) { |
157 |
} elsif ( $op eq 'add_biblio' ) { |
|
|
158 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
154 |
$shelfnumber = $query->param('shelfnumber'); |
159 |
$shelfnumber = $query->param('shelfnumber'); |
155 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
160 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
156 |
if ($shelf) { |
161 |
if ($shelf) { |
Lines 207-212
if ( $op eq 'add_form' ) {
Link Here
|
207 |
} |
212 |
} |
208 |
$op = $referer; |
213 |
$op = $referer; |
209 |
} elsif ( $op eq 'remove_biblios' ) { |
214 |
} elsif ( $op eq 'remove_biblios' ) { |
|
|
215 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
210 |
$shelfnumber = $query->param('shelfnumber'); |
216 |
$shelfnumber = $query->param('shelfnumber'); |
211 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
217 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
212 |
my @biblionumbers = $query->multi_param('biblionumber'); |
218 |
my @biblionumbers = $query->multi_param('biblionumber'); |
213 |
- |
|
|