|
Lines 30-35
use Koha::DateUtils;
Link Here
|
| 30 |
use Koha::Database; |
30 |
use Koha::Database; |
| 31 |
use Koha::IssuingRule; |
31 |
use Koha::IssuingRule; |
| 32 |
use Koha::IssuingRules; |
32 |
use Koha::IssuingRules; |
|
|
33 |
use Koha::Libraries; |
| 33 |
|
34 |
|
| 34 |
my $input = CGI->new; |
35 |
my $input = CGI->new; |
| 35 |
my $dbh = C4::Context->dbh; |
36 |
my $dbh = C4::Context->dbh; |
|
Lines 50-56
my $type=$input->param('type');
Link Here
|
| 50 |
my $branch = $input->param('branch'); |
51 |
my $branch = $input->param('branch'); |
| 51 |
unless ( $branch ) { |
52 |
unless ( $branch ) { |
| 52 |
if ( C4::Context->preference('DefaultToLoggedInLibraryCircRules') ) { |
53 |
if ( C4::Context->preference('DefaultToLoggedInLibraryCircRules') ) { |
| 53 |
$branch = GetBranchesCount() == 1 ? undef : C4::Branch::mybranch(); |
54 |
$branch = Koha::Libraries->search->count == 1 ? undef : C4::Branch::mybranch(); |
| 54 |
} |
55 |
} |
| 55 |
else { |
56 |
else { |
| 56 |
$branch = C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*'; |
57 |
$branch = C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*'; |
| 57 |
- |
|
|