Lines 337-343
sub get_template_and_user {
Link Here
|
337 |
singleBranchMode => C4::Context->preference("singleBranchMode"), |
337 |
singleBranchMode => C4::Context->preference("singleBranchMode"), |
338 |
XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"), |
338 |
XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"), |
339 |
XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"), |
339 |
XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"), |
340 |
BranchesLoop => GetBranchesLoop(), |
|
|
341 |
using_https => $in->{'query'}->https() ? 1 : 0, |
340 |
using_https => $in->{'query'}->https() ? 1 : 0, |
342 |
noItemTypeImages => C4::Context->preference("noItemTypeImages"), |
341 |
noItemTypeImages => C4::Context->preference("noItemTypeImages"), |
343 |
); |
342 |
); |
Lines 380-396
sub get_template_and_user {
Link Here
|
380 |
# variables passed from CGI: opac_css_override and opac_search_limits. |
379 |
# variables passed from CGI: opac_css_override and opac_search_limits. |
381 |
my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'}; |
380 |
my $opac_search_limit = $ENV{'OPAC_SEARCH_LIMIT'}; |
382 |
my $opac_limit_override = $ENV{'OPAC_LIMIT_OVERRIDE'}; |
381 |
my $opac_limit_override = $ENV{'OPAC_LIMIT_OVERRIDE'}; |
383 |
my $mylibraryfirst = C4::Context->preference("SearchMyLibraryFirst"); |
382 |
my $opac_name = ''; |
384 |
my $opac_name; |
383 |
if (($opac_search_limit =~ /branch:(\w+)/ && $opac_limit_override) || $in->{'query'}->param('limit') =~ /branch:(\w+)/){ |
385 |
if($opac_limit_override && ($opac_search_limit =~ /branch:(\w+)/) ){ |
384 |
$opac_name = $1; # opac_search_limit is a branch, so we use it. |
386 |
$opac_name = C4::Branch::GetBranchName($1) # opac_search_limit is a branch, so we use it. |
385 |
} elsif (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv && C4::Context->userenv->{'branch'}) { |
387 |
} elsif($mylibraryfirst){ |
386 |
$opac_name = C4::Context->userenv->{'branch'}; |
388 |
$opac_name = C4::Branch::GetBranchName($mylibraryfirst); |
|
|
389 |
} |
387 |
} |
390 |
$template->param( |
388 |
$template->param( |
391 |
AmazonContent => "" . C4::Context->preference("AmazonContent"), |
389 |
AmazonContent => "" . C4::Context->preference("AmazonContent"), |
392 |
AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), |
390 |
AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), |
393 |
AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), |
391 |
AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), |
|
|
392 |
BranchesLoop => GetBranchesLoop($opac_name), |
394 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
393 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
395 |
LibraryNameTitle => "" . $LibraryNameTitle, |
394 |
LibraryNameTitle => "" . $LibraryNameTitle, |
396 |
LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"", |
395 |
LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"", |
Lines 408-414
sub get_template_and_user {
Link Here
|
408 |
OpacAuthorities => C4::Context->preference("OpacAuthorities"), |
407 |
OpacAuthorities => C4::Context->preference("OpacAuthorities"), |
409 |
OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} . |
408 |
OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} . |
410 |
($ENV{'SERVER_PORT'} eq ($in->{'query'}->https() ? "443" : "80") ? '' : ":$ENV{'SERVER_PORT'}"), |
409 |
($ENV{'SERVER_PORT'} eq ($in->{'query'}->https() ? "443" : "80") ? '' : ":$ENV{'SERVER_PORT'}"), |
411 |
opac_name => $opac_name, |
|
|
412 |
opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, |
410 |
opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, |
413 |
opac_search_limit => $opac_search_limit, |
411 |
opac_search_limit => $opac_search_limit, |
414 |
opac_limit_override => $opac_limit_override, |
412 |
opac_limit_override => $opac_limit_override, |