From a9b9f8002bb54039ed09ccb1a48587473c482341 Mon Sep 17 00:00:00 2001 From: toins Date: Tue, 17 Jul 2007 09:28:52 +0000 Subject: [PATCH] using LoginBranchnameShort instead of LoginBranchname. --- C4/Auth.pm | 126 +++++++++--------- .../intranet-tmpl/prog/en/includes/menus.inc | 2 +- 2 files changed, 67 insertions(+), 61 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 6fd530df6f..ca99f8161e 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -52,12 +52,15 @@ C4::Auth - Authenticates Koha users my $query = new CGI; my ($template, $borrowernumber, $cookie) - = get_template_and_user({template_name => "opac-main.tmpl", - query => $query, - type => "opac", - authnotrequired => 1, - flagsrequired => {borrow => 1}, - }); + = get_template_and_user( + { + template_name => "opac-main.tmpl", + query => $query, + type => "opac", + authnotrequired => 1, + flagsrequired => {borrow => 1}, + } + ); print $query->header( -type => 'utf-8', @@ -87,12 +90,15 @@ C4::Auth - Authenticates Koha users =item get_template_and_user my ($template, $borrowernumber, $cookie) - = get_template_and_user({template_name => "opac-main.tmpl", - query => $query, - type => "opac", - authnotrequired => 1, - flagsrequired => {borrow => 1}, - }); + = get_template_and_user( + { + template_name => "opac-main.tmpl", + query => $query, + type => "opac", + authnotrequired => 1, + flagsrequired => {borrow => 1}, + } + ); This call passes the C, C and C to C<&checkauth> (in this module) to perform authentification. @@ -214,25 +220,25 @@ sub get_template_and_user { } if ( $in->{'type'} eq "intranet" ) { $template->param( - intranetcolorstylesheet => - C4::Context->preference("intranetcolorstylesheet"), - intranetstylesheet => C4::Context->preference("intranetstylesheet"), - IntranetNav => C4::Context->preference("IntranetNav"), - intranetuserjs => C4::Context->preference("intranetuserjs"), - TemplateEncoding => C4::Context->preference("TemplateEncoding"), - AmazonContent => C4::Context->preference("AmazonContent"), - LibraryName => C4::Context->preference("LibraryName"), - LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure"), - LoginBranchname => (C4::Context->userenv?C4::Context->userenv->{"branchname"}:"insecure"), - AutoLocation => C4::Context->preference("AutoLocation"), - hide_marc => C4::Context->preference("hide_marc"), - patronimages => C4::Context->preference("patronimages"), + intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"), + intranetstylesheet => C4::Context->preference("intranetstylesheet"), + IntranetNav => C4::Context->preference("IntranetNav"), + intranetuserjs => C4::Context->preference("intranetuserjs"), + TemplateEncoding => C4::Context->preference("TemplateEncoding"), + AmazonContent => C4::Context->preference("AmazonContent"), + LibraryName => C4::Context->preference("LibraryName"), + LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure"), + LoginBranchname => (C4::Context->userenv?C4::Context->userenv->{"branchname"}:"insecure"), + LoginBranchnameShort => substr((C4::Context->userenv?C4::Context->userenv->{"branchname"}:"insecure"),0,10), + AutoLocation => C4::Context->preference("AutoLocation"), + hide_marc => C4::Context->preference("hide_marc"), + patronimages => C4::Context->preference("patronimages"), "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, - advancedMARCEditor => C4::Context->preference("advancedMARCEditor"), - suggestion => C4::Context->preference("suggestion"), - virtualshelves => C4::Context->preference("virtualshelves"), - LibraryName => C4::Context->preference("LibraryName"), - KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), + advancedMARCEditor => C4::Context->preference("advancedMARCEditor"), + suggestion => C4::Context->preference("suggestion"), + virtualshelves => C4::Context->preference("virtualshelves"), + LibraryName => C4::Context->preference("LibraryName"), + KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), ); } else { @@ -242,36 +248,36 @@ sub get_template_and_user { $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; $template->param( - KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), - suggestion => "" . C4::Context->preference("suggestion"), - virtualshelves => "" . C4::Context->preference("virtualshelves"), - OpacNav => "" . C4::Context->preference("OpacNav"), - opacheader => "" . C4::Context->preference("opacheader"), - opaccredits => "" . C4::Context->preference("opaccredits"), - opacsmallimage => "" . C4::Context->preference("opacsmallimage"), - opaclargeimage => "" . C4::Context->preference("opaclargeimage"), - opaclayoutstylesheet => "". C4::Context->preference("opaclayoutstylesheet"), - opaccolorstylesheet => "". C4::Context->preference("opaccolorstylesheet"), - opaclanguagesdisplay => "". C4::Context->preference("opaclanguagesdisplay"), - opacuserlogin => "" . C4::Context->preference("opacuserlogin"), - opacbookbag => "" . C4::Context->preference("opacbookbag"), - TemplateEncoding => "". C4::Context->preference("TemplateEncoding"), - AmazonContent => "" . C4::Context->preference("AmazonContent"), - LibraryName => "" . C4::Context->preference("LibraryName"), - LibraryNameTitle => "" . $LibraryNameTitle, - LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure"), - LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"", - OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), - opacreadinghistory => C4::Context->preference("opacreadinghistory"), - opacuserjs => C4::Context->preference("opacuserjs"), - OpacCloud => C4::Context->preference("OpacCloud"), - OpacTopissue => C4::Context->preference("OpacTopissue"), - OpacAuthorities => C4::Context->preference("OpacAuthorities"), - OpacBrowser => C4::Context->preference("OpacBrowser"), - RequestOnOpac => C4::Context->preference("RequestOnOpac"), - reviewson => C4::Context->preference("reviewson"), - hide_marc => C4::Context->preference("hide_marc"), - patronimages => C4::Context->preference("patronimages"), + KohaAdminEmailAddress => "" . C4::Context->preference("KohaAdminEmailAddress"), + suggestion => "" . C4::Context->preference("suggestion"), + virtualshelves => "" . C4::Context->preference("virtualshelves"), + OpacNav => "" . C4::Context->preference("OpacNav"), + opacheader => "" . C4::Context->preference("opacheader"), + opaccredits => "" . C4::Context->preference("opaccredits"), + opacsmallimage => "" . C4::Context->preference("opacsmallimage"), + opaclargeimage => "" . C4::Context->preference("opaclargeimage"), + opaclayoutstylesheet => "". C4::Context->preference("opaclayoutstylesheet"), + opaccolorstylesheet => "". C4::Context->preference("opaccolorstylesheet"), + opaclanguagesdisplay => "". C4::Context->preference("opaclanguagesdisplay"), + opacuserlogin => "" . C4::Context->preference("opacuserlogin"), + opacbookbag => "" . C4::Context->preference("opacbookbag"), + TemplateEncoding => "". C4::Context->preference("TemplateEncoding"), + AmazonContent => "" . C4::Context->preference("AmazonContent"), + LibraryName => "" . C4::Context->preference("LibraryName"), + LibraryNameTitle => "" . $LibraryNameTitle, + LoginBranchcode => (C4::Context->userenv?C4::Context->userenv->{"branch"}:"insecure"), + LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"", + OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), + opacreadinghistory => C4::Context->preference("opacreadinghistory"), + opacuserjs => C4::Context->preference("opacuserjs"), + OpacCloud => C4::Context->preference("OpacCloud"), + OpacTopissue => C4::Context->preference("OpacTopissue"), + OpacAuthorities => C4::Context->preference("OpacAuthorities"), + OpacBrowser => C4::Context->preference("OpacBrowser"), + RequestOnOpac => C4::Context->preference("RequestOnOpac"), + reviewson => C4::Context->preference("reviewson"), + hide_marc => C4::Context->preference("hide_marc"), + patronimages => C4::Context->preference("patronimages"), "BiblioDefaultView".C4::Context->preference("BiblioDefaultView") => 1, ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc index 571275c121..344b8b5ccb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/menus.inc @@ -80,7 +80,7 @@ Login information
  • Logged in as: - at
  • + at
  • autolocate activated
  • -- 2.39.5