|
Lines 2172-2178
sub MarkIssueReturned {
Link Here
|
| 2172 |
push @bind, $issue_id; |
2172 |
push @bind, $issue_id; |
| 2173 |
|
2173 |
|
| 2174 |
# FIXME Improve the return value and handle it from callers |
2174 |
# FIXME Improve the return value and handle it from callers |
|
|
2175 |
my $do_not_lock = ( exists $ENV{_} && $ENV{_} =~ m|prove| ) || $ENV{KOHA_NO_TABLE_LOCKS}; |
| 2175 |
$schema->txn_do(sub { |
2176 |
$schema->txn_do(sub { |
|
|
2177 |
|
| 2178 |
C4::Context->dbh->do(q|LOCK TABLE old_issues READ|) unless $do_not_lock; |
| 2179 |
C4::Context->dbh->do(q|LOCK TABLE old_issues WRITE|) unless $do_not_lock; |
| 2180 |
|
| 2176 |
$dbh->do( $query, undef, @bind ); |
2181 |
$dbh->do( $query, undef, @bind ); |
| 2177 |
|
2182 |
|
| 2178 |
my $original_issue_id = $issue_id; |
2183 |
my $original_issue_id = $issue_id; |
|
Lines 2209-2214
sub MarkIssueReturned {
Link Here
|
| 2209 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
2214 |
my $patron = Koha::Patrons->find( $borrowernumber ); |
| 2210 |
$item->last_returned_by( $patron ); |
2215 |
$item->last_returned_by( $patron ); |
| 2211 |
} |
2216 |
} |
|
|
2217 |
|
| 2218 |
C4::Context->dbh->do(q|UNLOCK TABLES|) unless $do_not_lock; |
| 2212 |
}); |
2219 |
}); |
| 2213 |
|
2220 |
|
| 2214 |
return $issue_id; |
2221 |
return $issue_id; |
| 2215 |
- |
|
|