From ee83c4ae809e79c54ab43c93a28d578d1e87ed5a Mon Sep 17 00:00:00 2001 From: Michael Hafen Date: Tue, 1 Sep 2009 11:18:05 -0600 Subject: [PATCH] smart-rules load users library instead of default If the user isn't a super librarian load their library by default instead of the default settings. This would eliminate some confusion amoung my librarians. Signed-off-by: Galen Charlton --- admin/smart-rules.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 40e9084a33..6086636859 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -29,10 +29,6 @@ use C4::Branch; # GetBranches my $input = new CGI; my $dbh = C4::Context->dbh; -my $type=$input->param('type'); -my $branch = $input->param('branch') || '*'; -my $op = $input->param('op'); - # my $flagsrequired; # $flagsrequired->{circulation}=1; my ($template, $loggedinuser, $cookie) @@ -44,6 +40,10 @@ my ($template, $loggedinuser, $cookie) debug => 1, }); +my $type=$input->param('type'); +my $branch = $input->param('branch') || ( C4::Branch::onlymine() ? ( C4::Branch::mybranch() || '*' ) : '*' ); +my $op = $input->param('op'); + if ($op eq 'delete') { my $itemtype = $input->param('itemtype'); my $categorycode = $input->param('categorycode'); -- 2.39.5