Lines 385-390
sub get_template_and_user {
Link Here
|
385 |
my $opac_name = ''; |
385 |
my $opac_name = ''; |
386 |
if (($opac_search_limit && $opac_search_limit =~ /branch:(\w+)/ && $opac_limit_override) || ($in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /branch:(\w+)/)){ |
386 |
if (($opac_search_limit && $opac_search_limit =~ /branch:(\w+)/ && $opac_limit_override) || ($in->{'query'}->param('limit') && $in->{'query'}->param('limit') =~ /branch:(\w+)/)){ |
387 |
$opac_name = $1; # opac_search_limit is a branch, so we use it. |
387 |
$opac_name = $1; # opac_search_limit is a branch, so we use it. |
|
|
388 |
} elsif ( $in->{'query'}->param('multibranchlimit') ) { |
389 |
$opac_name = $in->{'query'}->param('multibranchlimit'); |
388 |
} elsif (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv && C4::Context->userenv->{'branch'}) { |
390 |
} elsif (C4::Context->preference("SearchMyLibraryFirst") && C4::Context->userenv && C4::Context->userenv->{'branch'}) { |
389 |
$opac_name = C4::Context->userenv->{'branch'}; |
391 |
$opac_name = C4::Context->userenv->{'branch'}; |
390 |
} |
392 |
} |
Lines 393-405
sub get_template_and_user {
Link Here
|
393 |
AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), |
395 |
AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"), |
394 |
AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), |
396 |
AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"), |
395 |
BranchesLoop => GetBranchesLoop($opac_name), |
397 |
BranchesLoop => GetBranchesLoop($opac_name), |
396 |
CalendarFirstDayOfWeek => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1, |
398 |
BranchCategoriesLoop => GetBranchCategories( undef, undef, 1, $opac_name ), |
|
|
399 |
CalendarFirstDayOfWeek => (C4::Context->preference("CalendarFirstDayOfWeek") eq "Sunday")?0:1, |
397 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
400 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
398 |
LibraryNameTitle => "" . $LibraryNameTitle, |
401 |
LibraryNameTitle => "" . $LibraryNameTitle, |
399 |
LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"", |
402 |
LoginBranchname => C4::Context->userenv?C4::Context->userenv->{"branchname"}:"", |
400 |
OPACAmazonCoverImages => C4::Context->preference("OPACAmazonCoverImages"), |
403 |
OPACAmazonCoverImages => C4::Context->preference("OPACAmazonCoverImages"), |
401 |
OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"), |
404 |
OPACFRBRizeEditions => C4::Context->preference("OPACFRBRizeEditions"), |
402 |
OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"), |
405 |
OpacHighlightedWords => C4::Context->preference("OpacHighlightedWords"), |
403 |
OPACItemHolds => C4::Context->preference("OPACItemHolds"), |
406 |
OPACItemHolds => C4::Context->preference("OPACItemHolds"), |
404 |
OPACShelfBrowser => "". C4::Context->preference("OPACShelfBrowser"), |
407 |
OPACShelfBrowser => "". C4::Context->preference("OPACShelfBrowser"), |
405 |
OpacShowRecentComments => C4::Context->preference("OpacShowRecentComments"), |
408 |
OpacShowRecentComments => C4::Context->preference("OpacShowRecentComments"), |
Lines 410-416
sub get_template_and_user {
Link Here
|
410 |
OpacAuthorities => C4::Context->preference("OpacAuthorities"), |
413 |
OpacAuthorities => C4::Context->preference("OpacAuthorities"), |
411 |
OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} . |
414 |
OPACBaseURL => ($in->{'query'}->https() ? "https://" : "http://") . $ENV{'SERVER_NAME'} . |
412 |
($ENV{'SERVER_PORT'} eq ($in->{'query'}->https() ? "443" : "80") ? '' : ":$ENV{'SERVER_PORT'}"), |
415 |
($ENV{'SERVER_PORT'} eq ($in->{'query'}->https() ? "443" : "80") ? '' : ":$ENV{'SERVER_PORT'}"), |
413 |
opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, |
416 |
opac_css_override => $ENV{'OPAC_CSS_OVERRIDE'}, |
414 |
opac_search_limit => $opac_search_limit, |
417 |
opac_search_limit => $opac_search_limit, |
415 |
opac_limit_override => $opac_limit_override, |
418 |
opac_limit_override => $opac_limit_override, |
416 |
OpacBrowser => C4::Context->preference("OpacBrowser"), |
419 |
OpacBrowser => C4::Context->preference("OpacBrowser"), |
Lines 424-430
sub get_template_and_user {
Link Here
|
424 |
OpacNavRight => "" . C4::Context->preference("OpacNavRight"), |
427 |
OpacNavRight => "" . C4::Context->preference("OpacNavRight"), |
425 |
OpacNavBottom => "" . C4::Context->preference("OpacNavBottom"), |
428 |
OpacNavBottom => "" . C4::Context->preference("OpacNavBottom"), |
426 |
OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), |
429 |
OpacPasswordChange => C4::Context->preference("OpacPasswordChange"), |
427 |
OPACPatronDetails => C4::Context->preference("OPACPatronDetails"), |
430 |
OPACPatronDetails => C4::Context->preference("OPACPatronDetails"), |
428 |
OPACPrivacy => C4::Context->preference("OPACPrivacy"), |
431 |
OPACPrivacy => C4::Context->preference("OPACPrivacy"), |
429 |
OPACFinesTab => C4::Context->preference("OPACFinesTab"), |
432 |
OPACFinesTab => C4::Context->preference("OPACFinesTab"), |
430 |
OpacTopissue => C4::Context->preference("OpacTopissue"), |
433 |
OpacTopissue => C4::Context->preference("OpacTopissue"), |