New syspref: AnonSuggestions to allow an anonymous patron to make a

suggestion (requested by NPL). To enable, set to the borrowernumber
of the anonymous patron (must be created).
This commit is contained in:
kados 2006-03-04 06:05:13 +00:00
parent 78b4e4e2ef
commit 09d4a8d2aa
2 changed files with 38 additions and 5 deletions

View File

@ -23,14 +23,32 @@ my $suggestedbyme = $input->param('suggestedbyme');
my $op = $input->param('op');
$op = 'else' unless $op;
my ($template, $borrowernumber, $cookie);
my $dbh = C4::Context->dbh;
my ($template, $borrowernumber, $cookie)
if (C4::Context->preference("AnonSuggestions")) {
($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => "opac-suggestions.tmpl",
type => "opac",
query => $input,
authnotrequired => 1,
flagsrequired => {borrow => 1},
query => $input,
type => "opac",
authnotrequired => 1,
});
if (!$borrowernumber) {
$borrowernumber = C4::Context->preference("AnonSuggestions");
}
} else {
($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => "opac-suggestions.tmpl",
query => $input,
type => "opac",
authnotrequired => 1,
});
}
if ($op eq "add_confirm") {
&newsuggestion($borrowernumber,$title,$author,$publishercode,$note,$copyrightdate,$volumedesc,$publicationyear,$place,$isbn,'');
# empty fields, to avoid filter in "searchsuggestion"

View File

@ -1046,6 +1046,16 @@ my %tabledata = (
explanation => 'Use HTML tabs to add navigational links to the left-hand navigational bar in Intranet',
type => 'free',
},
{
uniquefieldrequired => 'variable',
variable => 'AnonSuggestions',
value => '0',
forceupdate => { 'explanation' => 1, '
type' => 1},
explanation => 'Set to anonymous borrowernumber to enable Anonymous suggestions',
type => 'free',
},
{
uniquefieldrequired => 'variable',
variable => 'AmazonContent',
@ -1718,6 +1728,11 @@ $sth->finish;
exit;
# $Log$
# Revision 1.100.2.33 2006/03/04 06:05:13 kados
# New syspref: AnonSuggestions to allow an anonymous patron to make a
# suggestion (requested by NPL). To enable, set to the borrowernumber
# of the anonymous patron (must be created).
#
# Revision 1.100.2.32 2006/03/03 16:20:23 kados
# hopefully fixes truncated amazon.com links in syspref
# ----------------------------------------------------------------------