projects
/
virtual-ldap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a447fea
)
reset objectclass for each search request
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 29 Apr 2009 09:18:11 +0000
(09:18 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Wed, 29 Apr 2009 09:18:11 +0000
(09:18 +0000)
lib/LDAP/Koha.pm
patch
|
blob
|
history
diff --git
a/lib/LDAP/Koha.pm
b/lib/LDAP/Koha.pm
index
2187bac
..
0eacc09
100644
(file)
--- a/
lib/LDAP/Koha.pm
+++ b/
lib/LDAP/Koha.pm
@@
-26,8
+26,9
@@
our $user = 'unconfigured-user';
our $passwd = 'unconfigured-password';
our $max_results = 3000; # FIXME must be enough for all users
our $passwd = 'unconfigured-password';
our $max_results = 3000; # FIXME must be enough for all users
+our $objectclass_default = 'hrEduPerson';
-our $objectclass
= 'HrEduPerson'
;
+our $objectclass;
$SIG{__DIE__} = sub {
warn "!!! DIE ", @_;
$SIG{__DIE__} = sub {
warn "!!! DIE ", @_;
@@
-156,6
+157,7
@@
sub search {
my $sql_where = '';
@values = ();
my $sql_where = '';
@values = ();
+ $objectclass = '';
foreach my $filter ( keys %{ $reqData->{'filter'} } ) {
foreach my $filter ( keys %{ $reqData->{'filter'} } ) {
@@
-185,6
+187,8
@@
sub search {
}
}
+ $objectclass ||= $objectclass_default;
+
my $sql_select = read_file( lc "sql/$objectclass.sql" );
if ( $sql_where ) {
if ( $sql_select !~ m{where}i ) {
my $sql_select = read_file( lc "sql/$objectclass.sql" );
if ( $sql_where ) {
if ( $sql_select !~ m{where}i ) {