Lines 29-35
use C4::Koha qw(
Link Here
|
29 |
); |
29 |
); |
30 |
use C4::Items qw( GetItemsLocationInfo ); |
30 |
use C4::Items qw( GetItemsLocationInfo ); |
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 62-67
if ( $op eq 'add_form' ) {
Link Here
|
62 |
# Only pass default |
62 |
# Only pass default |
63 |
$shelf = { allow_change_from_owner => 1 }; |
63 |
$shelf = { allow_change_from_owner => 1 }; |
64 |
} elsif ( $op eq 'edit_form' ) { |
64 |
} elsif ( $op eq 'edit_form' ) { |
|
|
65 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
65 |
$shelfnumber = $query->param('shelfnumber'); |
66 |
$shelfnumber = $query->param('shelfnumber'); |
66 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
67 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
67 |
|
68 |
|
Lines 77-82
if ( $op eq 'add_form' ) {
Link Here
|
77 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
78 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
78 |
} |
79 |
} |
79 |
} elsif ( $op eq 'add' ) { |
80 |
} elsif ( $op eq 'add' ) { |
|
|
81 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
80 |
my $allow_changes_from = $query->param('allow_changes_from'); |
82 |
my $allow_changes_from = $query->param('allow_changes_from'); |
81 |
eval { |
83 |
eval { |
82 |
$shelf = Koha::Virtualshelf->new( |
84 |
$shelf = Koha::Virtualshelf->new( |
Lines 102-107
if ( $op eq 'add_form' ) {
Link Here
|
102 |
$op = 'view'; |
104 |
$op = 'view'; |
103 |
} |
105 |
} |
104 |
} elsif ( $op eq 'edit' ) { |
106 |
} elsif ( $op eq 'edit' ) { |
|
|
107 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
105 |
$shelfnumber = $query->param('shelfnumber'); |
108 |
$shelfnumber = $query->param('shelfnumber'); |
106 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
109 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
107 |
|
110 |
|
Lines 132-137
if ( $op eq 'add_form' ) {
Link Here
|
132 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
135 |
push @messages, { type => 'alert', code => 'does_not_exist' }; |
133 |
} |
136 |
} |
134 |
} elsif ( $op eq 'delete' ) { |
137 |
} elsif ( $op eq 'delete' ) { |
|
|
138 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
135 |
$shelfnumber = $query->param('shelfnumber'); |
139 |
$shelfnumber = $query->param('shelfnumber'); |
136 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
140 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
137 |
if ($shelf) { |
141 |
if ($shelf) { |
Lines 150-155
if ( $op eq 'add_form' ) {
Link Here
|
150 |
} |
154 |
} |
151 |
$op = 'list'; |
155 |
$op = 'list'; |
152 |
} elsif ( $op eq 'add_biblio' ) { |
156 |
} elsif ( $op eq 'add_biblio' ) { |
|
|
157 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
153 |
$shelfnumber = $query->param('shelfnumber'); |
158 |
$shelfnumber = $query->param('shelfnumber'); |
154 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
159 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
155 |
if ($shelf) { |
160 |
if ($shelf) { |
Lines 206-211
if ( $op eq 'add_form' ) {
Link Here
|
206 |
} |
211 |
} |
207 |
$op = $referer; |
212 |
$op = $referer; |
208 |
} elsif ( $op eq 'remove_biblios' ) { |
213 |
} elsif ( $op eq 'remove_biblios' ) { |
|
|
214 |
output_and_exit_if_error($query, $cookie, $template, { check => 'csrf_token' }); |
209 |
$shelfnumber = $query->param('shelfnumber'); |
215 |
$shelfnumber = $query->param('shelfnumber'); |
210 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
216 |
$shelf = Koha::Virtualshelves->find($shelfnumber); |
211 |
my @biblionumbers = $query->multi_param('biblionumber'); |
217 |
my @biblionumbers = $query->multi_param('biblionumber'); |
212 |
- |
|
|