/[virtual-ldap]/lib/LDAP/Koha.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/LDAP/Koha.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 51 by dpavlin, Wed Apr 29 09:18:11 2009 UTC revision 52 by dpavlin, Wed Apr 29 09:29:46 2009 UTC
# Line 25  our $database = 'koha'; Line 25  our $database = 'koha';
25  our $user     = 'unconfigured-user';  our $user     = 'unconfigured-user';
26  our $passwd   = 'unconfigured-password';  our $passwd   = 'unconfigured-password';
27    
28  our $max_results = 3000; # FIXME must be enough for all users  our $max_results = $ENV{MAX_RESULTS} || 3000; # FIXME must be enough for all users
29  our $objectclass_default = 'hrEduPerson';  our $objectclass_default = 'hrEduPerson';
30    
31  our $objectclass;  our $objectclass;
# Line 199  sub search { Line 199  sub search {
199                  }                  }
200    
201    
202                  warn "# SQL:\n$sql_select\n", $sql_where ? $sql_where : '-- no where', "\n# DATA: ",dump( @values );                  my $sql
203                  my $sth = $dbh->prepare( $sql_select . $sql_where . " LIMIT $max_results" ); # XXX remove limit?                          = $sql_select
204                            . $sql_where
205                            . ( $objectclass =~ m{person}i ? " LIMIT $max_results" : '' ) # add limit just for persons
206                            ;
207    
208                    warn "# SQL:\n$sql\n# DATA: ",dump( @values );
209                    my $sth = $dbh->prepare( $sql );
210                  $sth->execute( @values );                  $sth->execute( @values );
211    
212                  warn "# ", $sth->rows, " results for ",dump( $reqData->{'filter'} );                  warn "# ", $sth->rows, " results for ",dump( $reqData->{'filter'} );

Legend:
Removed from v.51  
changed lines
  Added in v.52

  ViewVC Help
Powered by ViewVC 1.1.26