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 64-69
if ( $op eq 'add_form' ) {
Link Here
|
64 |
# Only pass default |
64 |
# Only pass default |
65 |
$shelf = { allow_change_from_owner => 1 }; |
65 |
$shelf = { allow_change_from_owner => 1 }; |
66 |
} elsif ( $op eq 'edit_form' ) { |
66 |
} elsif ( $op eq 'edit_form' ) { |
|
|
67 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
67 |
$shelfnumber = $query->param('shelfnumber'); |
68 |
$shelfnumber = $query->param('shelfnumber'); |
68 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
69 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
69 |
|
70 |
|
Lines 79-84
if ( $op eq 'add_form' ) {
Link Here
|
79 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
80 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
80 |
} |
81 |
} |
81 |
} elsif ( $op eq 'add' ) { |
82 |
} elsif ( $op eq 'add' ) { |
|
|
83 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
82 |
my $allow_changes_from = $query->param('allow_changes_from'); |
84 |
my $allow_changes_from = $query->param('allow_changes_from'); |
83 |
eval { |
85 |
eval { |
84 |
$shelf = Koha::Virtualshelf->new( |
86 |
$shelf = Koha::Virtualshelf->new( |
Lines 105-110
if ( $op eq 'add_form' ) {
Link Here
|
105 |
$op = 'view'; |
107 |
$op = 'view'; |
106 |
} |
108 |
} |
107 |
} elsif ( $op eq 'edit' ) { |
109 |
} elsif ( $op eq 'edit' ) { |
|
|
110 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
108 |
$shelfnumber = $query->param('shelfnumber'); |
111 |
$shelfnumber = $query->param('shelfnumber'); |
109 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
112 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
110 |
|
113 |
|
Lines 136-141
if ( $op eq 'add_form' ) {
Link Here
|
136 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
139 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
137 |
} |
140 |
} |
138 |
} elsif ( $op eq 'delete' ) { |
141 |
} elsif ( $op eq 'delete' ) { |
|
|
142 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
139 |
$shelfnumber = $query->param('shelfnumber'); |
143 |
$shelfnumber = $query->param('shelfnumber'); |
140 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
144 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
141 |
if ($shelf) { |
145 |
if ($shelf) { |
Lines 154-159
if ( $op eq 'add_form' ) {
Link Here
|
154 |
} |
158 |
} |
155 |
$op = 'list'; |
159 |
$op = 'list'; |
156 |
} elsif ( $op eq 'add_biblio' ) { |
160 |
} elsif ( $op eq 'add_biblio' ) { |
|
|
161 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
157 |
$shelfnumber = $query->param('shelfnumber'); |
162 |
$shelfnumber = $query->param('shelfnumber'); |
158 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
163 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
159 |
if ($shelf) { |
164 |
if ($shelf) { |
Lines 210-215
if ( $op eq 'add_form' ) {
Link Here
|
210 |
} |
215 |
} |
211 |
$op = $referer; |
216 |
$op = $referer; |
212 |
} elsif ( $op eq 'remove_biblios' ) { |
217 |
} elsif ( $op eq 'remove_biblios' ) { |
|
|
218 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
213 |
$shelfnumber = $query->param('shelfnumber'); |
219 |
$shelfnumber = $query->param('shelfnumber'); |
214 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
220 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
215 |
my @biblionumbers = $query->multi_param('biblionumber'); |
221 |
my @biblionumbers = $query->multi_param('biblionumber'); |
216 |
- |
|
|