[Koha-patches] [PATCH] Fix Maintenance page.

Joe Atzberger joe.atzberger at liblime.com
Fri Aug 7 20:40:54 CEST 2009


Without this, the mainenance page would not display because of:
Cannot use undefined value as a HASH reference in C4/Auth.pm
---
 C4/Auth.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Auth.pm b/C4/Auth.pm
index afe5fbf..871c124 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -357,7 +357,7 @@ sub get_template_and_user {
             XSLTDetailsDisplay        => C4::Context->preference("XSLTDetailsDisplay"),
             XSLTResultsDisplay        => C4::Context->preference("XSLTResultsDisplay"),
             hidelostitems             => C4::Context->preference("hidelostitems"),
-            mylibraryfirst            => (C4::Context->preference("SearchMyLibraryFirst")) ? C4::Context->userenv->{'branch'} : '',
+            mylibraryfirst            => (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv) ? C4::Context->userenv->{'branch'} : '',
             opaclayoutstylesheet      => "" . C4::Context->preference("opaclayoutstylesheet"),
             opaccolorstylesheet       => "" . C4::Context->preference("opaccolorstylesheet"),
             opacstylesheet            => "" . C4::Context->preference("opacstylesheet"),
-- 
1.5.6.5




More information about the Koha-patches mailing list