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

(-)a/admin/smart-rules.pl (-1 / +1 lines)
Lines 43-49 my ($template, $loggedinuser, $cookie) Link Here
43
                            });
43
                            });
44
44
45
my $type=$input->param('type');
45
my $type=$input->param('type');
46
my $branch = $input->param('branch') || ( C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*' );
46
my $branch = $input->param('branch') || C4::Branch::mybranch();
47
my $op = $input->param('op') || q{};
47
my $op = $input->param('op') || q{};
48
48
49
if ($op eq 'delete') {
49
if ($op eq 'delete') {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/letter.tt (-1 / +1 lines)
Lines 162-168 $(document).ready(function() { Link Here
162
      <p>
162
      <p>
163
        Select a library :
163
        Select a library :
164
            <select name="branchcode" id="branch" style="width:20em;">
164
            <select name="branchcode" id="branch" style="width:20em;">
165
                <option value="">All libraries</option>
165
                <option value="*">All libraries</option>
166
            [% FOREACH branchloo IN branchloop %]
166
            [% FOREACH branchloo IN branchloop %]
167
                [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
167
                [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
168
            [% END %]
168
            [% END %]
(-)a/tools/letter.pl (-10 / +17 lines)
Lines 58-72 sub protected_letters { Link Here
58
    return { map { $_->[0] => 1 } @{$codes} };
58
    return { map { $_->[0] => 1 } @{$codes} };
59
}
59
}
60
60
61
our $input       = new CGI;
61
our $input = new CGI;
62
my $searchfield = $input->param('searchfield');
63
my $script_name = '/cgi-bin/koha/tools/letter.pl';
64
our $branchcode  = $input->param('branchcode');
65
my $code        = $input->param('code');
66
my $module      = $input->param('module') || '';
67
my $content     = $input->param('content');
68
my $op          = $input->param('op') || '';
69
my $dbh = C4::Context->dbh;
70
62
71
our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user(
63
our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user(
72
    {
64
    {
Lines 79-84 our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user Link Here
79
    }
71
    }
80
);
72
);
81
73
74
my $searchfield = $input->param('searchfield');
75
my $script_name = '/cgi-bin/koha/tools/letter.pl';
76
my $code        = $input->param('code');
77
my $module      = $input->param('module');
78
my $content     = $input->param('content');
79
my $op          = $input->param('op') || '';
80
81
# Default to logged in branch for notice list only
82
our $branchcode =
83
    $input->param('branchcode') eq '*' ? undef
84
  : $input->param('branchcode') ? $input->param('branchcode')
85
  : $op                         ? $input->param('branchcode')
86
  :                               C4::Branch::mybranch();
87
88
my $dbh = C4::Context->dbh;
89
82
our $my_branch = C4::Context->preference("IndependentBranches") && !$staffflags->{'superlibrarian'}
90
our $my_branch = C4::Context->preference("IndependentBranches") && !$staffflags->{'superlibrarian'}
83
  ?  C4::Context->userenv()->{'branch'}
91
  ?  C4::Context->userenv()->{'branch'}
84
  : undef;
92
  : undef;
85
- 

Return to bug 11625