From 9ca4027b80fb0cc278455cd0ff8066834bfa5af3 Mon Sep 17 00:00:00 2001 From: Srdjan Jankovic Date: Thu, 16 Feb 2012 15:42:25 +1300 Subject: [PATCH] bug_7001: Superlibrarian can edit/copy everything. 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