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