[Koha-patches] [PATCH] bug_7001: Superlibrarian can edit/copy everything.
Srdjan Jankovic
srdjan at catalyst.net.nz
Thu Feb 16 03:51:19 CET 2012
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
More information about the Koha-patches
mailing list