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 143-149 $(document).ready(function() { Link Here
143
      <p>
143
      <p>
144
        Select a library :
144
        Select a library :
145
            <select name="branchcode" id="branch" style="width:20em;">
145
            <select name="branchcode" id="branch" style="width:20em;">
146
                <option value="">All libraries</option>
146
                <option value="*">All libraries</option>
147
            [% FOREACH branchloo IN branchloop %]
147
            [% FOREACH branchloo IN branchloop %]
148
                [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
148
                [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
149
            [% END %]
149
            [% END %]
(-)a/tools/letter.pl (-10 / +17 lines)
Lines 85-99 sub protected_letters { Link Here
85
    return { map { $_->[0] => 1 } @{$codes} };
85
    return { map { $_->[0] => 1 } @{$codes} };
86
}
86
}
87
87
88
our $input       = new CGI;
88
our $input = new CGI;
89
my $searchfield = $input->param('searchfield');
90
my $script_name = '/cgi-bin/koha/tools/letter.pl';
91
our $branchcode  = $input->param('branchcode');
92
my $code        = $input->param('code');
93
my $module      = $input->param('module');
94
my $content     = $input->param('content');
95
my $op          = $input->param('op') || '';
96
my $dbh = C4::Context->dbh;
97
89
98
our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user(
90
our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user(
99
    {
91
    {
Lines 106-111 our ( $template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user Link Here
106
    }
98
    }
107
);
99
);
108
100
101
my $searchfield = $input->param('searchfield');
102
my $script_name = '/cgi-bin/koha/tools/letter.pl';
103
my $code        = $input->param('code');
104
my $module      = $input->param('module');
105
my $content     = $input->param('content');
106
my $op          = $input->param('op') || '';
107
108
# Default to logged in branch for notice list only
109
our $branchcode =
110
    $input->param('branchcode') eq '*' ? undef
111
  : $input->param('branchcode') ? $input->param('branchcode')
112
  : $op                         ? $input->param('branchcode')
113
  :                               C4::Branch::mybranch();
114
115
my $dbh = C4::Context->dbh;
116
109
our $my_branch = C4::Context->preference("IndependentBranches") && !$staffflags->{'superlibrarian'}
117
our $my_branch = C4::Context->preference("IndependentBranches") && !$staffflags->{'superlibrarian'}
110
  ?  C4::Context->userenv()->{'branch'}
118
  ?  C4::Context->userenv()->{'branch'}
111
  : undef;
119
  : undef;
112
- 

Return to bug 11625