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

(-)a/circ/set-library.pl (-2 / +2 lines)
Lines 22-28 use CGI qw ( -utf8 ); Link Here
22
22
23
use C4::Context;
23
use C4::Context;
24
use C4::Output qw( output_html_with_http_headers );
24
use C4::Output qw( output_html_with_http_headers );
25
use C4::Auth qw( get_template_and_user get_session );
25
use C4::Auth qw( get_template_and_user get_session haspermission );
26
use Koha::BiblioFrameworks;
26
use Koha::BiblioFrameworks;
27
use Koha::Cash::Registers;
27
use Koha::Cash::Registers;
28
use Koha::Libraries;
28
use Koha::Libraries;
Lines 49-55 my $userenv_register_id = C4::Context->userenv->{'register_id'} || ''; Link Here
49
my @updated;
49
my @updated;
50
50
51
# $session lines here are doing the updating
51
# $session lines here are doing the updating
52
if ( $branch and my $library = Koha::Libraries->find($branch) and ( $flags->{loggedinlibrary} == 1 or $flags->{superlibrarian} == 1 ) ) {
52
if ( $branch and my $library = Koha::Libraries->find($branch) and ( C4::Auth::haspermission(C4::Context->userenv->{'id'}, { 'loggedinlibrary' => 1 }) or C4::Context::IsSuperLibraian() ) ) {
53
    if ( !$userenv_branch or $userenv_branch ne $branch  )  {
53
    if ( !$userenv_branch or $userenv_branch ne $branch  )  {
54
        my $branchname = $library->branchname;
54
        my $branchname = $library->branchname;
55
        $session->param('branchname', $branchname);         # update sesssion in DB
55
        $session->param('branchname', $branchname);         # update sesssion in DB
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/set-library.tt (-2 / +1 lines)
Lines 90-96 Updated:<ul> Link Here
90
    <ol>
90
    <ol>
91
        <li><label for="branch">Choose library:</label>
91
        <li><label for="branch">Choose library:</label>
92
        <select name="branch" id="branch">
92
        <select name="branch" id="branch">
93
            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch ) %]
93
            [% PROCESS options_for_libraries libraries => Branches.all( selected => branch, unfiltered => 1 ) %]
94
        </select></li>
94
        </select></li>
95
    </ol>
95
    </ol>
96
</fieldset>
96
</fieldset>
97
- 

Return to bug 30624