|
Lines 1267-1299
sub IsAvailableForItemLevelRequest {
Link Here
|
| 1267 |
} |
1267 |
} |
| 1268 |
} |
1268 |
} |
| 1269 |
|
1269 |
|
| 1270 |
sub _get_itype { |
|
|
| 1271 |
my $item = shift; |
| 1272 |
|
| 1273 |
my $itype; |
| 1274 |
if (C4::Context->preference('item-level_itypes')) { |
| 1275 |
# We can't trust GetItem to honour the syspref, so safest to do it ourselves |
| 1276 |
# When GetItem is fixed, we can remove this |
| 1277 |
$itype = $item->{itype}; |
| 1278 |
} |
| 1279 |
else { |
| 1280 |
# XXX This is a bit dodgy. It relies on biblio itemtype column having different name. |
| 1281 |
# So if we already have a biblioitems join when calling this function, |
| 1282 |
# we don't need to access the database again |
| 1283 |
$itype = $item->{itemtype}; |
| 1284 |
} |
| 1285 |
unless ($itype) { |
| 1286 |
my $dbh = C4::Context->dbh; |
| 1287 |
my $query = "SELECT itemtype FROM biblioitems WHERE biblioitemnumber = ? "; |
| 1288 |
my $sth = $dbh->prepare($query); |
| 1289 |
$sth->execute($item->{biblioitemnumber}); |
| 1290 |
if (my $data = $sth->fetchrow_hashref()){ |
| 1291 |
$itype = $data->{itemtype}; |
| 1292 |
} |
| 1293 |
} |
| 1294 |
return $itype; |
| 1295 |
} |
| 1296 |
|
| 1297 |
=head2 AlterPriority |
1270 |
=head2 AlterPriority |
| 1298 |
|
1271 |
|
| 1299 |
AlterPriority( $where, $reserve_id, $prev_priority, $next_priority, $first_priority, $last_priority ); |
1272 |
AlterPriority( $where, $reserve_id, $prev_priority, $next_priority, $first_priority, $last_priority ); |
| 1300 |
- |
|
|