$LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
$LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
$template->param(
- AmazonContent => "" . C4::Context->preference("AmazonContent"),
+ OPACAmazonContent => "" . C4::Context->preference("OPACAmazonContent"),
AnonSuggestions => "" . C4::Context->preference("AnonSuggestions"),
AuthorisedValueImages => C4::Context->preference("AuthorisedValueImages"),
LibraryName => "" . C4::Context->preference("LibraryName"),
virtualshelves => "" . C4::Context->preference("virtualshelves"),
);
}
- $template->param(listloop=>[{shelfname=>"Freelist", shelfnumber=>110}]);
return ( $template, $borrowernumber, $cookie, $flags);
}
Verifies that the user is authorized to run this script. If
the user is authorized, a (userid, cookie, session-id, flags)
-quadruple is returned. If the user is not authorized but does
-not have the required privilege (see $flagsrequired below), it
+quadruple is returned. If the user is not authorized due to
+insufficent privileges (see $flagsrequired below), it
displays an error page and exits. Otherwise, it displays the
login page and exits.
my ( $dbh, $userid, $password ) = @_;
if ($ldap) {
- $debug and print "## checkpw - checking LDAP\n";
+ $debug and print STDERR "## checkpw - checking LDAP\n";
my ($retval,$retcard) = checkpw_ldap(@_); # EXTERNAL AUTH
($retval) and return ($retval,$retcard);
}
my $userid = shift;
my $dbh = C4::Context->dbh;
- my $sth = $dbh->prepare("SELECT flag, code
+ my $sth = $dbh->prepare("SELECT flag, user_permissions.code as code
FROM user_permissions
JOIN permissions USING (module_bit, code)
- JOIN userflags ON (module_bit = bit)
- JOIN borrowers USING (borrowernumber)
+ JOIN userflags ON (permissions.module_bit = userflags.bit)
+ JOIN borrowers ON (user_permissions.borrowernumber=borrowers.borrowernumber)
WHERE userid = ?");
$sth->execute($userid);