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

(-)a/acqui/basket.pl (-4 / +2 lines)
Lines 199-206 if ( $op eq 'delete_confirm' ) { Link Here
199
        # if requested, create basket group, close it and attach the basket
199
        # if requested, create basket group, close it and attach the basket
200
        if ($query->param('createbasketgroup')) {
200
        if ($query->param('createbasketgroup')) {
201
            my $branchcode;
201
            my $branchcode;
202
            if(C4::Context->userenv and C4::Context->userenv->{'branch'}
202
            if(C4::Context->userenv and C4::Context->userenv->{'branch'}) {
203
              and C4::Context->userenv->{'branch'} ne "NO_LIBRARY_SET") {
204
                $branchcode = C4::Context->userenv->{'branch'};
203
                $branchcode = C4::Context->userenv->{'branch'};
205
            }
204
            }
206
            my $basketgroupid = NewBasketgroup( { name => $basket->{basketname},
205
            my $basketgroupid = NewBasketgroup( { name => $basket->{basketname},
Lines 543-550 sub edi_close_and_order { Link Here
543
        if ( $query->param('createbasketgroup') ) {
542
        if ( $query->param('createbasketgroup') ) {
544
            my $branchcode;
543
            my $branchcode;
545
            if (    C4::Context->userenv
544
            if (    C4::Context->userenv
546
                and C4::Context->userenv->{'branch'}
545
                and C4::Context->userenv->{'branch'} )
547
                and C4::Context->userenv->{'branch'} ne "NO_LIBRARY_SET" )
548
            {
546
            {
549
                $branchcode = C4::Context->userenv->{'branch'};
547
                $branchcode = C4::Context->userenv->{'branch'};
550
            }
548
            }
(-)a/admin/smart-rules.pl (-2 lines)
Lines 66-73 my $can_edit_from_any_library = $logged_in_patron->has_permission( {parameters = Link Here
66
$template->param( restricted_to_own_library => not $can_edit_from_any_library );
66
$template->param( restricted_to_own_library => not $can_edit_from_any_library );
67
$branch = C4::Context::mybranch() unless $can_edit_from_any_library;
67
$branch = C4::Context::mybranch() unless $can_edit_from_any_library;
68
68
69
$branch = '*' if $branch eq 'NO_LIBRARY_SET';
70
71
my $op = $input->param('op') || q{};
69
my $op = $input->param('op') || q{};
72
my $language = C4::Languages::getlanguage();
70
my $language = C4::Languages::getlanguage();
73
71
(-)a/catalogue/detail.pl (-2 / +1 lines)
Lines 382-389 foreach my $item (@items) { Link Here
382
        }
382
        }
383
    }
383
    }
384
384
385
    if ($currentbranch and $currentbranch ne "NO_LIBRARY_SET"
385
    if ($currentbranch and C4::Context->preference('SeparateHoldings')) {
386
    and C4::Context->preference('SeparateHoldings')) {
387
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
386
        if ($itembranchcode and $itembranchcode eq $currentbranch) {
388
            push @itemloop, $item;
387
            push @itemloop, $item;
389
        } else {
388
        } else {
(-)a/circ/branchtransfers.pl (-1 / +1 lines)
Lines 45-51 if (!C4::Context->userenv){ Link Here
45
	my $sessionID = $query->cookie("CGISESSID");
45
	my $sessionID = $query->cookie("CGISESSID");
46
    my $session;
46
    my $session;
47
	$session = get_session($sessionID) if $sessionID;
47
	$session = get_session($sessionID) if $sessionID;
48
	if (!$session or $session->param('branch') eq 'NO_LIBRARY_SET'){
48
	if (!$session){
49
		# no branch set we can't transfer
49
		# no branch set we can't transfer
50
		print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
50
		print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
51
		exit;
51
		exit;
(-)a/circ/circulation.pl (-7 lines)
Lines 73-85 my $override_high_holds_tmp = $query->param('override_high_holds_tmp'); Link Here
73
73
74
my $sessionID = $query->cookie("CGISESSID") ;
74
my $sessionID = $query->cookie("CGISESSID") ;
75
my $session = get_session($sessionID);
75
my $session = get_session($sessionID);
76
if (!C4::Context->userenv){
77
    if ($session->param('branch') eq 'NO_LIBRARY_SET'){
78
        # no branch set we can't issue
79
        print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
80
        exit;
81
    }
82
}
83
76
84
my $barcodes = [];
77
my $barcodes = [];
85
my $barcode =  $query->param('barcode');
78
my $barcode =  $query->param('barcode');
(-)a/circ/returns.pl (-5 lines)
Lines 70-80 my ( $template, $librarian, $cookie, $flags ) = get_template_and_user( Link Here
70
70
71
my $sessionID = $query->cookie("CGISESSID");
71
my $sessionID = $query->cookie("CGISESSID");
72
my $session = get_session($sessionID);
72
my $session = get_session($sessionID);
73
if ($session->param('branch') eq 'NO_LIBRARY_SET'){
74
    # no branch set we can't return
75
    print $query->redirect("/cgi-bin/koha/circ/selectbranchprinter.pl");
76
    exit;
77
}
78
73
79
# Print a reserve slip on this page
74
# Print a reserve slip on this page
80
if ( $query->param('print_slip') ) {
75
if ( $query->param('print_slip') ) {
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc (-13 / +5 lines)
Lines 78-89 Link Here
78
                            </brand>
78
                            </brand>
79
                        [% ELSE %]
79
                        [% ELSE %]
80
                            <strong>
80
                            <strong>
81
                                [% IF ( LoginBranchname == 'NO_LIBRARY_SET' ) %]
81
                                <span class="logged-in-branch-name">[% LoginBranchname | html %]</span>
82
                                    NO LIBRARY SET
82
                                <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
83
                                [% ELSE %]
84
                                    <span class="logged-in-branch-name">[% LoginBranchname | html %]</span>
85
                                    <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
86
                                [% END %]
87
                            </strong>
83
                            </strong>
88
                        [% END %]
84
                        [% END %]
89
                    </span>
85
                    </span>
Lines 101-113 Link Here
101
                                [% LoginBranchname | html %]
97
                                [% LoginBranchname | html %]
102
                            </brand>
98
                            </brand>
103
                        [% ELSE %]
99
                        [% ELSE %]
104
                            [% IF ( LoginBranchname == 'NO_LIBRARY_SET' ) %]
100
                            Location: <br />
105
                                NO LIBRARY SET
101
                            <span class="logged-in-branch-name">[% LoginBranchname | html %]</span>
106
                            [% ELSE %]
102
                            <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
107
                                Location: <br />
108
                                <span class="logged-in-branch-name">[% LoginBranchname | html %]</span>
109
                                <span class="logged-in-branch-code content_hidden">[% Branches.GetLoggedInBranchcode | html %]</span>
110
                            [% END %]
111
                        [% END %]
103
                        [% END %]
112
                    </li>
104
                    </li>
113
105
(-)a/tools/overduerules.pl (-2 lines)
Lines 77-83 $branch = Link Here
77
  : Koha::Libraries->search->count() == 1                              ? undef
77
  : Koha::Libraries->search->count() == 1                              ? undef
78
  :                                                                      undef;
78
  :                                                                      undef;
79
$branch ||= q{};
79
$branch ||= q{};
80
$branch = q{} if $branch eq 'NO_LIBRARY_SET';
81
80
82
my $op = $input->param('op');
81
my $op = $input->param('op');
83
$op ||= q{};
82
$op ||= q{};
84
- 

Return to bug 21746