|
Lines 207-228
elsif ( $op eq 'add_validate' ) {
Link Here
|
| 207 |
'categorycode' |
207 |
'categorycode' |
| 208 |
) |
208 |
) |
| 209 |
); |
209 |
); |
| 210 |
my @branches = $input->param("branches"); |
|
|
| 211 |
if (@branches) { |
| 212 |
$sth = $dbh->prepare( |
| 213 |
"DELETE FROM categories_branches WHERE categorycode = ?" |
| 214 |
); |
| 215 |
$sth->execute( $input->param("categorycode") ); |
| 216 |
$sth = $dbh->prepare( |
| 217 |
"INSERT INTO categories_branches ( categorycode, branchcode ) VALUES ( ?, ? )" |
| 218 |
); |
| 219 |
for my $branchcode (@branches) { |
| 220 |
next if not $branchcode; |
| 221 |
$sth->bind_param( 1, $input->param("categorycode") ); |
| 222 |
$sth->bind_param( 2, $branchcode ); |
| 223 |
$sth->execute; |
| 224 |
} |
| 225 |
} |
| 226 |
$sth->finish; |
210 |
$sth->finish; |
| 227 |
} |
211 |
} |
| 228 |
else { |
212 |
else { |
|
Lines 261-266
elsif ( $op eq 'add_validate' ) {
Link Here
|
| 261 |
} |
245 |
} |
| 262 |
} |
246 |
} |
| 263 |
|
247 |
|
|
|
248 |
my @branches = $input->param("branches"); |
| 249 |
if (@branches) { |
| 250 |
my $sth = $dbh->prepare( |
| 251 |
"DELETE FROM categories_branches WHERE categorycode = ?" |
| 252 |
); |
| 253 |
$sth->execute( $input->param("categorycode") ); |
| 254 |
$sth = $dbh->prepare( |
| 255 |
"INSERT INTO categories_branches ( categorycode, branchcode ) VALUES ( ?, ? )" |
| 256 |
); |
| 257 |
for my $branchcode (@branches) { |
| 258 |
next if not $branchcode; |
| 259 |
$sth->bind_param( 1, $input->param("categorycode") ); |
| 260 |
$sth->bind_param( 2, $branchcode ); |
| 261 |
$sth->execute; |
| 262 |
} |
| 263 |
} |
| 264 |
|
| 264 |
if ( C4::Context->preference('EnhancedMessagingPreferences') ) { |
265 |
if ( C4::Context->preference('EnhancedMessagingPreferences') ) { |
| 265 |
C4::Form::MessagingPreferences::handle_form_action( $input, |
266 |
C4::Form::MessagingPreferences::handle_form_action( $input, |
| 266 |
{ categorycode => $input->param('categorycode') }, $template ); |
267 |
{ categorycode => $input->param('categorycode') }, $template ); |
| 267 |
- |
|
|