View | Details | Raw Unified | Return to bug 15568
Collapse All | Expand All

(-)a/admin/smart-rules.pl (-7 / +8 lines)
Lines 48-59 my ($template, $loggedinuser, $cookie) Link Here
48
48
49
my $type=$input->param('type');
49
my $type=$input->param('type');
50
50
51
my $branch;
51
my $branch = $input->param('branch');
52
if ( C4::Context->preference('DefaultToLoggedInLibraryCircRules') ) {
52
unless ( $branch ) {
53
    $branch = $input->param('branch') || Koha::Libraries->search->count() == 1 ? undef : C4::Branch::mybranch();
53
    if ( C4::Context->preference('DefaultToLoggedInLibraryCircRules') ) {
54
}
54
        $branch = Koha::Libraries->search->count() == 1 ? undef : C4::Branch::mybranch();
55
else {
55
    }
56
    $branch = $input->param('branch') || ( C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*' );
56
    else {
57
        $branch = C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*';
58
    }
57
}
59
}
58
$branch = '*' if $branch eq 'NO_LIBRARY_SET';
60
$branch = '*' if $branch eq 'NO_LIBRARY_SET';
59
61
60
- 

Return to bug 15568