Commit ced0cfe7 authored by Benjamin Rokseth's avatar Benjamin Rokseth
Browse files

koha: transitional fix: add custom template params from C4::Auth::get_template_and_user

Will be migrated to Core::Prefs in time
parent a8204507
......@@ -188,6 +188,7 @@ sub templateAndPermissions {
#}
$self->setTemplatePermissions( $template, $auth, $branch );
$self->setCustomTemplateParams( $template ); # Various overrides from previous C4::Auth::get_template_and_user
return $template;
}
......@@ -229,4 +230,63 @@ sub setTemplatePermissions {
}
return $template;
}
# TODO: this should be handled by core prefs module
# Various overrides from previous C4::Auth::get_template_and_user
sub setCustomTemplateParams {
my ($self, $template) = @_;
$template->param(
dateformat => "dmydot", # dd.mm.yyyy
minPasswordLength => "0",
EnhancedMessagingPreferences => "1",
KohaAdminEmailAddress => 'noreply@deichman.no',
UseKohaPlugins => "1",
# from Auth
# LoginBranchcode => C4::Context->userenv->{"branch"},
# LoginFirstname => C4::Context->userenv->{"firstname"},
# LoginSurname => C4::Context->userenv->{"surname"},
# emailaddress => C4::Context->userenv->{"emailaddress"},
# unused
# TagsEnabled => C4::Context->preference("TagsEnabled"),
# hide_marc => C4::Context->preference("hide_marc"),
# item_level_itypes => C4::Context->preference('item-level_itypes'),
# XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
# XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
# using_https => 0,
# noItemTypeImages => C4::Context->preference("noItemTypeImages"),
# marcflavour => C4::Context->preference("marcflavour"),
# AmazonCoverImages => C4::Context->preference("AmazonCoverImages"),
# AutoLocation => C4::Context->preference("AutoLocation"),
# CircAutocompl => C4::Context->preference("CircAutocompl"),
# FRBRizeEditions => C4::Context->preference("FRBRizeEditions"),
# IndependentBranches => C4::Context->preference("IndependentBranches"),
# IntranetNav => C4::Context->preference("IntranetNav"),
# IntranetmainUserblock => C4::Context->preference("IntranetmainUserblock"),
# LibraryName => C4::Context->preference("LibraryName"),
# LoginBranchname => ( C4::Context->userenv ? C4::Context->userenv->{"branchname"} : undef ),
# advancedMARCEditor => C4::Context->preference("advancedMARCEditor"),
# canreservefromotherbranches => C4::Context->preference('canreservefromotherbranches'),
# intranetcolorstylesheet => C4::Context->preference("intranetcolorstylesheet"),
# IntranetFavicon => C4::Context->preference("IntranetFavicon"),
# intranetreadinghistory => C4::Context->preference("intranetreadinghistory"),
# intranetstylesheet => C4::Context->preference("intranetstylesheet"),
# IntranetUserCSS => C4::Context->preference("IntranetUserCSS"),
# IntranetUserJS => C4::Context->preference("IntranetUserJS"),
# intranetbookbag => C4::Context->preference("intranetbookbag"),
# suggestion => C4::Context->preference("suggestion"),
# virtualshelves => C4::Context->preference("virtualshelves"),
# StaffSerialIssueDisplayCount => C4::Context->preference("StaffSerialIssueDisplayCount"),
# EasyAnalyticalRecords => C4::Context->preference('EasyAnalyticalRecords'),
# LocalCoverImages => C4::Context->preference('LocalCoverImages'),
# OPACLocalCoverImages => C4::Context->preference('OPACLocalCoverImages'),
# AllowMultipleCovers => C4::Context->preference('AllowMultipleCovers'),
# EnableBorrowerFiles => C4::Context->preference('EnableBorrowerFiles'),
# UseCourseReserves => C4::Context->preference("UseCourseReserves"),
# useDischarge => C4::Context->preference('useDischarge'),
);
}
1;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment