require Exporter;
use C4::Context;
-use C4::Output; # to get the template
+use C4::Templates; # to get the template
use C4::Members;
use C4::Koha;
use C4::Branch; # GetBranches
require C4::Auth_with_cas; # no import
if ($ldap) {
require C4::Auth_with_ldap;
- # no import import C4::Auth_with_ldap qw(checkpw_ldap);
+ import C4::Auth_with_ldap qw(checkpw_ldap);
}
if ($cas) {
import C4::Auth_with_cas qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url);
=cut
my $SEARCH_HISTORY_INSERT_SQL =<<EOQ;
-INSERT INTO search_history(userid, sessionid, query_desc, query_cgi, limit_desc, limit_cgi, total, time )
-VALUES ( ?, ?, ?, ?, ?, ?, ?, FROM_UNIXTIME(?))
+INSERT INTO search_history(userid, sessionid, query_desc, query_cgi, total, time )
+VALUES ( ?, ?, ?, ?, ?, FROM_UNIXTIME(?))
EOQ
sub get_template_and_user {
my $in = shift;
my $template =
- gettemplate( $in->{'template_name'}, $in->{'type'}, $in->{'query'} );
+ C4::Templates::gettemplate( $in->{'template_name'}, $in->{'type'}, $in->{'query'} );
my ( $user, $cookie, $sessionID, $flags );
if ( $in->{'template_name'} !~m/maintenance/ ) {
( $user, $cookie, $sessionID, $flags ) = checkauth(
my @recentSearches = @{thaw($searchcookie) || []};
if (@recentSearches) {
my $sth = $dbh->prepare($SEARCH_HISTORY_INSERT_SQL);
-
- $sth->execute( $borrowernumber, $in->{'query'}->cookie("CGISESSID"), $_->{'query_desc'}, $_->{'query_cgi'}, $_->{'limit_desc'}, $_->{'limit_cgi'}, $_->{'total'}, $_->{'time'}, )
- foreach @recentSearches;
+ $sth->execute( $borrowernumber,
+ $in->{'query'}->cookie("CGISESSID"),
+ $_->{'query_desc'},
+ $_->{'query_cgi'},
+ $_->{'total'},
+ $_->{'time'},
+ ) foreach @recentSearches;
# And then, delete the cookie's content
my $newsearchcookie = $in->{'query'}->cookie(
virtualshelves => C4::Context->preference("virtualshelves"),
StaffSerialIssueDisplayCount => C4::Context->preference("StaffSerialIssueDisplayCount"),
NoZebra => C4::Context->preference('NoZebra'),
+ EasyAnalyticalRecords => C4::Context->preference('EasyAnalyticalRecords'),
);
}
else {
opac_limit_override => $opac_limit_override,
OpacBrowser => C4::Context->preference("OpacBrowser"),
OpacCloud => C4::Context->preference("OpacCloud"),
+ OpacKohaUrl => C4::Context->preference("OpacKohaUrl"),
OpacMainUserBlock => "" . C4::Context->preference("OpacMainUserBlock"),
OpacNav => "" . C4::Context->preference("OpacNav"),
OpacPasswordChange => C4::Context->preference("OpacPasswordChange"),
}
my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tmpl' : 'auth.tmpl';
- my $template = gettemplate( $template_name, $type, $query );
+ my $template = C4::Templates::gettemplate( $template_name, $type, $query );
$template->param(branchloop => \@branch_loop,);
my $checkstyle = C4::Context->preference("opaccolorstylesheet");
if ($checkstyle =~ /\//)