/[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 52 by dpavlin, Wed Apr 29 09:29:46 2009 UTC revision 58 by dpavlin, Tue Sep 15 13:10:13 2009 UTC
# Line 131  sub _dn_attributes { Line 131  sub _dn_attributes {
131          my $dn = delete( $row->{dn} ) || die "no dn in ",dump( $row );          my $dn = delete( $row->{dn} ) || die "no dn in ",dump( $row );
132    
133          # this does some sanity cleanup for our data          # this does some sanity cleanup for our data
134          my $base_as_domain = $base;  #       my $base_as_domain = $base;
135          $base_as_domain =~ s{dn=}{.};  #       $base_as_domain =~ s{dn=}{.};
136          $base_as_domain =~ s{^\.}{@};  #       $base_as_domain =~ s{^\.}{@};
137          $dn =~ s{$base_as_domain$}{};  #       $dn =~ s{$base_as_domain$}{};
138    #
139          $dn .= ',' . $base unless $dn =~ m{,}; # add base if none present  #       $dn .= ',' . $base unless $dn =~ m{,}; # add base if none present
140    
141          return ($dn, $row);          return ($dn, $row);
142  }  }
# Line 229  sub search { Line 229  sub search {
229                                          undef $entry;                                          undef $entry;
230                                  }                                  }
231    
232                                    $dn =~ s{@[^,]+}{};
233    
234                                  $entry = Net::LDAP::Entry->new;                                  $entry = Net::LDAP::Entry->new;
235                                  $entry->dn( $dn );                                  $entry->dn( $dn );
236    
# Line 247  sub search { Line 249  sub search {
249    
250                  }                  }
251    
252                  warn "### last entry ",$entry->dump( \*STDERR );                  if ( $entry ) {
253                  push @entries, $entry;                          warn "### last entry ",$entry->dump( \*STDERR );
254                            push @entries, $entry;
255                    }
256    
257          } else {          } else {
258                  warn "UNKNOWN request: ",dump( $reqData );                  warn "UNKNOWN request: ",dump( $reqData );

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

  ViewVC Help
Powered by ViewVC 1.1.26