Lines 215-237
sub store {
Link Here
|
215 |
WHERE code = ?"); |
215 |
WHERE code = ?"); |
216 |
} else { |
216 |
} else { |
217 |
$sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types |
217 |
$sth = $dbh->prepare_cached("INSERT INTO borrower_attribute_types |
218 |
(description, repeatable, unique_id, opac_display, opac_editable, |
218 |
( description, |
219 |
staff_searchable, authorised_value_category, display_checkout, category_code, class, code) |
219 |
repeatable, |
220 |
VALUES (?, ?, ?, ?, ?, |
220 |
unique_id, |
221 |
?, ?, ?, ?, ?, ?)"); |
221 |
opac_display, |
|
|
222 |
opac_editable, |
223 |
staff_searchable, |
224 |
authorised_value_category, |
225 |
display_checkout, |
226 |
category_code, |
227 |
class, |
228 |
code |
229 |
) |
230 |
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); |
222 |
} |
231 |
} |
223 |
$sth->bind_param(1, $self->{'description'}); |
232 |
|
224 |
$sth->bind_param(2, $self->{'repeatable'}); |
233 |
$sth->execute( |
225 |
$sth->bind_param(3, $self->{'unique_id'}); |
234 |
$self->{'description'}, |
226 |
$sth->bind_param(4, $self->{'opac_display'}); |
235 |
$self->{'repeatable'}, |
227 |
$sth->bind_param(5, $self->{'opac_editable'}); |
236 |
$self->{'unique_id'}, |
228 |
$sth->bind_param(7, $self->{'staff_searchable'}); |
237 |
$self->{'opac_display'}, |
229 |
$sth->bind_param(8, $self->{'authorised_value_category'}); |
238 |
$self->{'opac_editable'}, |
230 |
$sth->bind_param(9, $self->{'display_checkout'}); |
239 |
$self->{'staff_searchable'} || 0, |
231 |
$sth->bind_param(10, $self->{'category_code'} || undef); |
240 |
$self->{'authorised_value_category'}, |
232 |
$sth->bind_param(11, $self->{'class'}); |
241 |
$self->{'display_checkout'}, |
233 |
$sth->bind_param(12, $self->{'code'}); |
242 |
$self->{'category_code'} || undef, |
234 |
$sth->execute; |
243 |
$self->{'class'}, |
|
|
244 |
$self->{'code'} |
245 |
); |
235 |
|
246 |
|
236 |
if ( defined $$self{branches} ) { |
247 |
if ( defined $$self{branches} ) { |
237 |
$sth = $dbh->prepare("DELETE FROM borrower_attribute_types_branches WHERE bat_code = ?"); |
248 |
$sth = $dbh->prepare("DELETE FROM borrower_attribute_types_branches WHERE bat_code = ?"); |