Important when IndependantBranches is set to Yes.
---
tools/letter.pl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/letter.pl b/tools/letter.pl
index 17c0e77..ae47810 100755
--- a/tools/letter.pl
+++ b/tools/letter.pl
@@ -95,7 +95,7 @@ my $content = $input->param('content');
my $op = $input->param('op') || '';
my $dbh = C4::Context->dbh;
-my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
+my ( $template, $borrowernumber, $cookie, $staffflags ) =
get_template_and_user(
{
template_name => 'tools/letter.tmpl',
query => $input,
@@ -106,7 +106,7 @@ my ( $template, $borrowernumber, $cookie ) =
get_template_and_user(
}
);
-my $my_branch = C4::Context->preference("IndependantBranches")
+my $my_branch = C4::Context->preference("IndependantBranches") &&
!$staffflags->{'superlibrarian'}
? C4::Context->userenv()->{'branch'}
: undef;
# we show only the TMPL_VAR names $op
--
1.6.5
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/