From e780e0669c8b2d2a50a7996ab76e584c4cd4c59d Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Fri, 16 Sep 2011 18:02:58 +0200 Subject: [PATCH] Bug 6875 de-nesting Auth.pm * removed use C4::Koha that is useless * moved "use C4::Members" to "require C4::Members" just before GetMemberDetails call. This will avoid loading C4::Member everytime a page is called by someone not logged * still to do = work on C4::VirtualShelves, that can be optimized, definetly ! Signed-off-by: Jared Camins-Esakov Rebased on latest master, 28 Jan 2012 Signed-off-by: Marcel de Rooy Please WAIT with virtual shelves. Working on that.. Tested and marked as Passed QA. --- C4/Auth.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index e4bd119648..a855818aa1 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -27,8 +27,6 @@ use CGI::Session; require Exporter; use C4::Context; use C4::Templates; # to get the template -use C4::Members; -use C4::Koha; use C4::Branch; # GetBranches use C4::VirtualShelves; use POSIX qw/strftime/; @@ -188,8 +186,8 @@ sub get_template_and_user { } $borrowernumber = getborrowernumber($user) if defined($user); - - my ( $borr ) = GetMemberDetails( $borrowernumber ); + require C4::Members; + my ( $borr ) = C4::Members::GetMemberDetails( $borrowernumber ); my @bordat; $bordat[0] = $borr; $template->param( "USER_INFO" => \@bordat ); -- 2.39.5